-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathminimum_deployment.yaml
55 lines (53 loc) · 1.05 KB
/
minimum_deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-deployment
spec:
selector:
matchLabels:
app: example
replicas: 4 # quantidade de pods que devem ser criados
template:
metadata:
labels:
app: example
spec:
nodeSelector:
kubernetes.io/os: linux
containers:
- name: example-app
image: xavero/weather:4.0.0
ports:
- name: http
containerPort: 80
livenessProbe:
httpGet:
path: /healthz
port: http
resources:
requests:
memory: 20Mi
cpu: 10m # 1% de uma cpu
limits:
memory: 100Mi
cpu: 500m # 50% de uma cpu
env:
- name: ASPNETCORE_URLS
value: http://0.0.0.0:80
---
apiVersion: v1
kind: Service
metadata:
name: example-service
labels:
app: example
spec:
type: NodePort
ports:
- name: http
port: 80
protocol: TCP
targetPort: http
nodePort: 32000
selector:
app: example