29 lines
795 B
YAML
29 lines
795 B
YAML
|
|
apiVersion: apps/v1
|
||
|
|
kind: Deployment
|
||
|
|
metadata:
|
||
|
|
name: prometheus-server
|
||
|
|
spec:
|
||
|
|
replicas: 1
|
||
|
|
template:
|
||
|
|
spec:
|
||
|
|
serviceAccountName: prometheus-server
|
||
|
|
containers:
|
||
|
|
- name: prometheus
|
||
|
|
image: prom/prometheus
|
||
|
|
args:
|
||
|
|
- "--config.file=/etc/prometheus/prometheus.yaml"
|
||
|
|
- "--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:
|
||
|
|
name: prometheus-configuration
|
||
|
|
- name: prometheus-storage-volume
|
||
|
|
emptyDir: {}
|