-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.yml
More file actions
57 lines (56 loc) · 1.3 KB
/
deploy.yml
File metadata and controls
57 lines (56 loc) · 1.3 KB
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
56
57
apiVersion: apps/v1
kind: Deployment
metadata:
name: node-app-deployment
namespace: node-namespace
labels:
app: node-label
spec:
replicas: 3
selector:
matchLabels:
app: node-label
template:
metadata:
labels:
app: node-label
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- amd64
- arm64
containers:
- name: node-app
image: iolowookere217/my-webapp:v1
ports:
- name: tcp
containerPort: 5000
imagePullPolicy: Always
readinessProbe:
httpGet:
path: /healthz # Replace with the path to your readiness endpoint
port: 5000 # Replace with the container port
initialDelaySeconds: 5 # Delay before the first probe
periodSeconds: 10
---
apiVersion: v1
kind: Service
metadata:
name: node-service
namespace: node-namespace
labels:
app: node-label
spec:
selector:
app: node-label
type: LoadBalancer
ports:
- protocol: TCP
port: 5000
targetPort: 5000