apiVersion: apps/v1
kind: Deployment
metadata:
  name: kube-state-metrics
spec:
  replicas: 1
  selector:
    matchLabels:
      run: kube-state-metrics
  template:
    metadata:
      labels:
        run: kube-state-metrics
      annotations:
        # Note: Do not enable service-discovery scraping.
        prometheus.io/scrape: 'false'
    spec:
      nodeSelector:
        prometheus-node: 'true'
      containers:
      - name: kube-state-metrics
        # image: gcr.io/google_containers/kube-state-metrics:v0.5.0
        image: quay.io/coreos/kube-state-metrics:v1.5.0
        args: [
          "--collectors=deployments,nodes,pods,services",
          "--port=8080",
        ]
        ports:
        - containerPort: 8080
