Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e43e24c

Browse files
authored
Create deployment.yaml
1 parent c28fc33 commit e43e24c

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: prometheus-deployment
5+
namespace: monitoring
6+
labels:
7+
app: prometheus-server
8+
spec:
9+
replicas: 1
10+
selector:
11+
matchLabels:
12+
app: prometheus-server
13+
template:
14+
metadata:
15+
labels:
16+
app: prometheus-server
17+
spec:
18+
containers:
19+
- name: prometheus
20+
image: prom/prometheus
21+
args:
22+
- "--config.file=/etc/prometheus/prometheus.yml"
23+
- "--storage.tsdb.path=/prometheus/"
24+
ports:
25+
- containerPort: 9090
26+
volumeMounts:
27+
- name: prometheus-config-volume
28+
mountPath: /etc/prometheus/
29+
- name: prometheus-storage-volume
30+
mountPath: /prometheus/
31+
volumes:
32+
- name: prometheus-config-volume
33+
configMap:
34+
defaultMode: 420
35+
name: prometheus-server-conf
36+
37+
- name: prometheus-storage-volume
38+
emptyDir: {}

0 commit comments

Comments
 (0)