apiVersion: v1
kind: Service
metadata:
  name: coredns-metrics
  namespace: kube-system
  labels:
    app.kubernetes.io/managed-by: "Helm"
    app.kubernetes.io/instance: "coredns"
    helm.sh/chart: "coredns-1.45.0"
    k8s-app: coredns
    kubernetes.io/cluster-service: "true"
    kubernetes.io/name: "CoreDNS"
    app.kubernetes.io/name: coredns
    app.kubernetes.io/component: metrics
  annotations:
    prometheus.io/port: "9153"
    prometheus.io/scrape: "true"
spec:
  selector:
    app.kubernetes.io/instance: "coredns"
    k8s-app: coredns
    app.kubernetes.io/name: coredns
  ports:
    - name: metrics
      port: 9153
      targetPort: 9153
