-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yaml
73 lines (73 loc) · 1.87 KB
/
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Source: sample-application/service.yaml
iVersion: v1
kind: Service
metadata:
name: sample-application-svc
labels:
type: backend
spec:
type: ClusterIP
ports:
- port: 80
targetPort: http
protocol: TCP
name: http
selector:
app.kubernetes.io/name: sample-application
app.kubernetes.io/instance: sample-application
---
# Source: sample-application/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: sample-application
labels:
app.kubernetes.io/name: sample-application
app.kubernetes.io/instance: sample-application
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: sample-application
app.kubernetes.io/instance: sample-application
template:
metadata:
labels:
app.kubernetes.io/name: sample-application
app.kubernetes.io/instance: sample-application
spec:
containers:
- name: sample-application
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
add: ["NET_ADMIN", "SYS_TIME"]
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 3000
image: "rahulit1991/sample-nodejs:latest"
imagePullPolicy: Always
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /health
port: http
initialDelaySeconds: 60
readinessProbe:
failureThreshold: 5
httpGet:
path: /health
port: http
initialDelaySeconds: 60
resources:
limits:
cpu: 256m
memory: 512Mi
requests:
cpu: 256m
memory: 512Mi