kube-state-metrics-deployment.yaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. labels:
  5. app.kubernetes.io/component: exporter
  6. app.kubernetes.io/name: kube-state-metrics
  7. app.kubernetes.io/part-of: kube-prometheus
  8. app.kubernetes.io/version: 2.4.2
  9. name: kube-state-metrics
  10. namespace: monitoring
  11. spec:
  12. replicas: 1
  13. selector:
  14. matchLabels:
  15. app.kubernetes.io/component: exporter
  16. app.kubernetes.io/name: kube-state-metrics
  17. app.kubernetes.io/part-of: kube-prometheus
  18. template:
  19. metadata:
  20. labels:
  21. app.kubernetes.io/component: exporter
  22. app.kubernetes.io/name: kube-state-metrics
  23. app.kubernetes.io/part-of: kube-prometheus
  24. app.kubernetes.io/version: 2.4.2
  25. spec:
  26. automountServiceAccountToken: true
  27. containers:
  28. - image: k8s.gcr.io/kube-state-metrics/kube-state-metrics:v2.4.2
  29. livenessProbe:
  30. httpGet:
  31. path: /healthz
  32. port: 8080
  33. initialDelaySeconds: 5
  34. timeoutSeconds: 5
  35. name: kube-state-metrics
  36. ports:
  37. - containerPort: 8080
  38. name: http-metrics
  39. - containerPort: 8081
  40. name: telemetry
  41. resources:
  42. limits:
  43. cpu: 20m
  44. memory: 40Mi
  45. requests:
  46. cpu: 10m
  47. memory: 20Mi
  48. readinessProbe:
  49. httpGet:
  50. path: /
  51. port: 8081
  52. initialDelaySeconds: 5
  53. timeoutSeconds: 5
  54. securityContext:
  55. allowPrivilegeEscalation: false
  56. capabilities:
  57. drop:
  58. - ALL
  59. readOnlyRootFilesystem: true
  60. runAsUser: 65534
  61. nodeSelector:
  62. kubernetes.io/os: linux
  63. serviceAccountName: kube-state-metrics