Skip to content

Commit cfef293

Browse files
committed
updated with example
1 parent 38e006e commit cfef293

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

k8s/prometheus.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: prometheus-deployment
5+
labels:
6+
app: prometheus
7+
purpose: example
8+
spec:
9+
replicas: 2
10+
selector:
11+
matchLabels:
12+
app: prometheus
13+
purpose: example
14+
template:
15+
metadata:
16+
labels:
17+
app: prometheus
18+
purpose: example
19+
spec:
20+
containers:
21+
- name: prometheus-example
22+
image: prom/prometheus
23+
volumeMounts:
24+
- name: config-volume
25+
mountPath: /etc/prometheus/prometheus.yml
26+
subPath: prometheus.yml
27+
ports:
28+
- containerPort: 9090
29+
volumes:
30+
- name: config-volume
31+
configMap:
32+
name: prometheus-example-cm
33+
---
34+
kind: Service
35+
apiVersion: v1
36+
metadata:
37+
name: prometheus-example-service
38+
spec:
39+
selector:
40+
app: prometheus
41+
purpose: example
42+
ports:
43+
- name: promui
44+
protocol: TCP
45+
port: 9090
46+
targetPort: 9090

0 commit comments

Comments
 (0)