prometheus.yaml 981 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. ---
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5. name: prometheus
  6. labels:
  7. app: prometheus
  8. spec:
  9. clusterIP: None
  10. selector:
  11. app: prometheus
  12. ports:
  13. - port: 9090
  14. name: dashboard
  15. protocol: TCP
  16. ---
  17. apiVersion: apps/v1
  18. kind: StatefulSet
  19. metadata:
  20. name: prometheus
  21. spec:
  22. selector:
  23. matchLabels:
  24. app: prometheus
  25. serviceName: prometheus
  26. template:
  27. metadata:
  28. labels:
  29. app: prometheus
  30. spec:
  31. restartPolicy: Always
  32. terminationGracePeriodSeconds: 0
  33. containers:
  34. - name: prometheus
  35. image: prometheus
  36. readinessProbe:
  37. tcpSocket:
  38. port: 9090
  39. periodSeconds: 1
  40. failureThreshold: 300
  41. ports:
  42. - containerPort: 9090
  43. name: dashboard
  44. protocol: TCP
  45. command:
  46. - "prometheus"
  47. - "--config.file=prometheus_config.yaml"
  48. - "--web.external-url=http://[::]:9090"