apiVersion: apps/v1
kind: Deployment
metadata:
  name: kube-state-metrics
  namespace: monitoring
spec:
  selector:
    matchLabels:
      k8s-app: kube-state-metrics
      grafanak8sapp: "true"
  replicas: 1
  template:
    metadata:
      labels:
        k8s-app: kube-state-metrics
        grafanak8sapp: "true"
    spec:
      serviceAccountName: kube-state-metrics
      containers:
        - name: kube-state-metrics
          image: quay.io/coreos/kube-state-metrics:v1.1.0
          ports:
            - name: http-metrics
              containerPort: 8080
          readinessProbe:
            httpGet:
              path: /healthz
              port: 8080
            initialDelaySeconds: 5
            timeoutSeconds: 5