apiVersion: apps/v1
kind: Deployment
metadata:
  name: kube-state-metrics-deployment
  namespace: monitoring
  labels:
    app.kubernetes.io/name: kube-state-metrics
    app.kubernetes.io/version: 1.9.5
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kube-state-metrics
  template:
    metadata:
      labels:
        app: kube-state-metrics
        app.kubernetes.io/name: kube-state-metrics
        app.kubernetes.io/version: 1.9.5
    spec:
      containers:
      - name: kube-state-metrics
        image: quay.io/coreos/kube-state-metrics:v1.7.2
        ports:
        - containerPort: 8080
        securityContext:
          runAsUser: 65534
      nodeSelector:
        beta.kubernetes.io/os: linux
      serviceAccountName: kube-state-metrics