File tree 3 files changed +116
-0
lines changed
3 files changed +116
-0
lines changed Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : Deployment
3
+ metadata :
4
+ labels :
5
+ app : giropops-senhas
6
+ name : giropops-senhas
7
+ spec :
8
+ replicas : 1
9
+ selector :
10
+ matchLabels :
11
+ app : giropops-senhas
12
+ template :
13
+ metadata :
14
+ labels :
15
+ app : giropops-senhas
16
+ spec :
17
+ containers :
18
+ - name : giropops-senhas
19
+ image : rafallltm/giropops-senhas:2.0
20
+ ports :
21
+ - containerPort : 5000
22
+ imagePullPolicy : Always
23
+ env :
24
+ - name : REDIS_HOST
25
+ value : " redis-service"
26
+ resources :
27
+ limits :
28
+ cpu : " 0.5"
29
+ memory : " 128Mi"
30
+ requests :
31
+ cpu : " 0.25"
32
+ memory : " 64Mi"
33
+ livenessProbe : # Sonda para verificar se o contêiner está saudável
34
+ httpGet :
35
+ path : /
36
+ port : 5000
37
+ initialDelaySeconds : 10 # Tempo de espera antes da primeira verificação
38
+ periodSeconds : 10 # Intervalo entre verificações
39
+ timeoutSeconds : 5 # Tempo máximo de espera por uma resposta
40
+ failureThreshold : 3 # Número de falhas consecutivas antes de reiniciar o contêiner
41
+
42
+ ---
43
+
44
+ apiVersion : v1
45
+ kind : Service
46
+ metadata :
47
+ labels :
48
+ app : giropops-senhas
49
+ name : giropops-senhas
50
+ spec :
51
+ selector :
52
+ app : giropops-senhas
53
+ ports :
54
+ - protocol : TCP
55
+ port : 5000
56
+ targetPort : 5000
57
+ type : ClusterIP
Original file line number Diff line number Diff line change
1
+ apiVersion : networking.k8s.io/v1
2
+ kind : Ingress
3
+ metadata :
4
+ name : giropops-senhas
5
+ annotations :
6
+ nginx.ingress.kubernetes.io/rewrite-target : /
7
+ spec :
8
+ ingressClassName : nginx
9
+ rules :
10
+ - http :
11
+ paths :
12
+ - path : /
13
+ pathType : Prefix
14
+ backend :
15
+ service :
16
+ name : giropops-senhas
17
+ port :
18
+ number : 5000
Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : Deployment
3
+ metadata :
4
+ name : redis-deployment
5
+ spec :
6
+ replicas : 1
7
+ selector :
8
+ matchLabels :
9
+ app : redis
10
+ template :
11
+ metadata :
12
+ labels :
13
+ app : redis
14
+ spec :
15
+ containers :
16
+ - name : redis
17
+ image : redis:alpine3.19
18
+ ports :
19
+ - containerPort : 6379
20
+ resources :
21
+ limits :
22
+ cpu : " 0.5"
23
+ memory : " 256Mi"
24
+ requests :
25
+ cpu : " 0.25"
26
+ memory : " 128Mi"
27
+
28
+ ---
29
+
30
+ apiVersion : v1
31
+ kind : Service
32
+ metadata :
33
+ name : redis-service
34
+ spec :
35
+ selector :
36
+ app : redis
37
+ ports :
38
+ - protocol : TCP
39
+ port : 6379
40
+ targetPort : 6379
41
+ type : ClusterIP
You can’t perform that action at this time.
0 commit comments