File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ apiVersion : apps/v1
2+ kind : Deployment
3+ metadata :
4+ name : prometheus
5+ namespace : monitoring
6+
7+ spec :
8+ replicas : 1
9+
10+ selector :
11+ matchLabels :
12+ app : prometheus
13+
14+ template :
15+ metadata :
16+ labels :
17+ app : prometheus
18+
19+ spec :
20+ containers :
21+
22+ - name : prometheus
23+ image : prom/prometheus:latest
24+ args :
25+ - " --config.file=/etc/prometheus/prometheus.yml"
26+
27+ ports :
28+ - containerPort : 9090
29+
30+ volumeMounts :
31+ - name : prometheus-config
32+ mountPath : /etc/prometheus
33+
34+ volumes :
35+ - name : prometheus-config
36+ configMap :
37+ name : prometheus-config
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Namespace
3+ metadata :
4+ name : monitoring
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : ConfigMap
3+ metadata :
4+ name : prometheus-config
5+ namespace : monitoring
6+
7+ data :
8+ prometheus.yml : |
9+ global:
10+ scrape_interval: 15s
11+ evaluation_interval: 15s
12+
13+ scrape_configs:
14+
15+ - job_name: "prometheus"
16+ static_configs:
17+ - targets:
18+ - localhost:9090
19+
20+ - job_name: "frontend"
21+ static_configs:
22+ - targets:
23+ - frontend-service.three-tier-app.svc.cluster.local:80
24+
25+ - job_name: "backend"
26+ static_configs:
27+ - targets:
28+ - backend-service.three-tier-app.svc.cluster.local:8080
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Service
3+
4+ metadata :
5+ name : prometheus
6+ namespace : monitoring
7+
8+ spec :
9+
10+ selector :
11+ app : prometheus
12+
13+ ports :
14+ - port : 9090
15+ targetPort : 9090
16+
17+ type : ClusterIP
You can’t perform that action at this time.
0 commit comments