| 1234567891011121314151617181920212223242526272829303132333435363738 |
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: prometheus-deployment
- namespace: monitoring
- labels:
- app: prometheus-server
- spec:
- replicas: 1
- selector:
- matchLabels:
- app: prometheus-server
- template:
- metadata:
- labels:
- app: prometheus-server
- spec:
- containers:
- - name: prometheus
- image: prom/prometheus
- args:
- - "--config.file=/etc/prometheus/prometheus.yml"
- - "--storage.tsdb.path=/prometheus/"
- ports:
- - containerPort: 9090
- volumeMounts:
- - name: prometheus-config-volume
- mountPath: /etc/prometheus/
- - name: prometheus-storage-volume
- mountPath: /prometheus/
- volumes:
- - name: prometheus-config-volume
- configMap:
- defaultMode: 420
- name: prometheus-server-conf
-
- - name: prometheus-storage-volume
- emptyDir: {}
|