1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
apiVersion: v1 kind: Service metadata: name: kube-state-metrics namespace: monitoring annotations: prometheus.io/scrape: "true" prometheus.io/port: "8080" spec: selector: app: kube-state-metrics ports: - protocol: TCP port: 8080 targetPort: 8080