apiVersion: apps/v1
kind: Deployment

metadata:
  name: kube-state-metrics
  namespace: monitoring

spec:
  replicas: 1
  selector:
    matchLabels:
      app: kube-state-metrics

  template:
    metadata:
      labels:
        app: kube-state-metrics

    spec:
      serviceAccountName: kube-state-metrics
      containers:
        - name: kube-state-metrics
          image: bitnami/kube-state-metrics:1.8.0 # kube1.15のため
          ports:
            - name: kube-metrics
              containerPort: 8080
          resources:
            requests:
              cpu: 20m
              memory: 50Mi
            limits:
              cpu: 100m
              memory: 100Mi
          readinessProbe:
            httpGet:
              path: /healthz
              port: 8080
            initialDelaySeconds: 5
            timeoutSeconds: 5
