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 : v1
2+ kind : Pod
3+ metadata :
4+ name : busybox-test
5+ namespace : tp2
6+ spec :
7+ containers :
8+ - name : busybox
9+ image : busybox
10+ command : ["sleep", "3600"]
11+ restartPolicy : Never
Original file line number Diff line number Diff line change 1+ apiVersion : apps/v1
2+ kind : Deployment
3+ metadata :
4+ name : devcalc-deployment
5+ namespace : tp2
6+ spec :
7+ replicas : 2
8+ selector :
9+ matchLabels :
10+ app : devcalc
11+ template :
12+ metadata :
13+ labels :
14+ app : devcalc
15+ spec :
16+ containers :
17+ - name : devcalc
18+ image : shyuu7/devcalc-api:latest
19+ ports :
20+ - containerPort : 8080
21+ livenessProbe :
22+ httpGet :
23+ path : /actuator/health/liveness
24+ port : 8080
25+ initialDelaySeconds : 60
26+ periodSeconds : 30
27+ timeoutSeconds : 10
28+ failureThreshold : 3
29+ readinessProbe :
30+ httpGet :
31+ path : /actuator/health/readiness
32+ port : 8080
33+ initialDelaySeconds : 90
34+ periodSeconds : 30
35+ timeoutSeconds : 10
36+ failureThreshold : 3
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Service
3+ metadata :
4+ name : devcalc-service
5+ namespace : tp2
6+ spec :
7+ selector :
8+ app : devcalc
9+ ports :
10+ - name : http
11+ port : 8080
12+ targetPort : 8080
13+ nodePort : 30003
14+ protocol : TCP
15+ type : NodePort
16+
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Namespace
3+ metadata :
4+ name : tp2
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Pod
3+ metadata :
4+ name : nginx-busy-pod
5+ namespace : tp2
6+ labels :
7+ app : nginx-busybox
8+ spec :
9+ containers :
10+ - name : nginx
11+ image : nginx:1.29.3-alpine-slim
12+ ports :
13+ - containerPort : 80
14+ - name : busybox
15+ image : busybox
16+ env :
17+ - name : USER
18+ value : " root"
19+ - name : PASSWORD
20+ value : " 123456"
21+ command : ["/bin/sh"]
22+ args :
23+ - -c
24+ - |
25+ while true; do
26+ echo "$(date): USER=$USER"
27+ wget -qO- http://localhost:80 || echo "Erro ao conectar ao Nginx"
28+ sleep 10
29+ done
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Service
3+ metadata :
4+ name : nginx-service
5+ namespace : tp2
6+ spec :
7+ selector :
8+ app : nginx-busybox
9+ ports :
10+ - name : http
11+ port : 8081
12+ targetPort : 80
13+ protocol : TCP
14+ type : ClusterIP
You can’t perform that action at this time.
0 commit comments