prometheus-deployment.yaml 962 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: prometheus-deployment
  5. namespace: monitoring
  6. labels:
  7. app: prometheus-server
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. app: prometheus-server
  13. template:
  14. metadata:
  15. labels:
  16. app: prometheus-server
  17. spec:
  18. containers:
  19. - name: prometheus
  20. image: prom/prometheus
  21. args:
  22. - "--config.file=/etc/prometheus/prometheus.yml"
  23. - "--storage.tsdb.path=/prometheus/"
  24. ports:
  25. - containerPort: 9090
  26. volumeMounts:
  27. - name: prometheus-config-volume
  28. mountPath: /etc/prometheus/
  29. - name: prometheus-storage-volume
  30. mountPath: /prometheus/
  31. volumes:
  32. - name: prometheus-config-volume
  33. configMap:
  34. defaultMode: 420
  35. name: prometheus-server-conf
  36. - name: prometheus-storage-volume
  37. emptyDir: {}