-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPrometheus.yml
59 lines (59 loc) · 1.15 KB
/
Prometheus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
apiVersion: v1
kind: Service
metadata:
name: prometheus
labels:
app: prometheus
spec:
ports:
- port: 9090
nodePort: 30002
selector:
app: prometheus
type: NodePort
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-prometheus
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: prom-deploy
labels:
app: prometheus
spec:
selector:
matchLabels:
app: prometheus
template:
metadata:
labels:
app: prometheus
spec:
containers:
- image: prom/prometheus
name: prometheus
ports:
- containerPort: 9090
name: prometheus
volumeMounts:
- name: prom-config
mountPath: /etc/prometheus/prometheus.yml
subPath: prometheus.yml
- name: pv-prometheus
mountPath: /prometheus
volumes:
- name: prom-config
configMap:
name: prom-graf-config
- name: pv-prometheus
persistentVolumeClaim:
claimName: pvc-prometheus