31 lines
601 B
YAML
31 lines
601 B
YAML
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: prometheus
|
||
|
namespace: prometheus-ns
|
||
|
labels:
|
||
|
app: prometheus
|
||
|
spec:
|
||
|
replicas: 1
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: prometheus
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: prometheus
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: prometheus
|
||
|
image: prom/prometheus:v2.27.1
|
||
|
ports:
|
||
|
- containerPort: 9090
|
||
|
volumeMounts:
|
||
|
- name: prometheus-storage
|
||
|
mountPath: /prometheus
|
||
|
volumes:
|
||
|
- name: prometheus-storage
|
||
|
persistentVolumeClaim:
|
||
|
claimName: prometheus-pvc
|
||
|
|