-
Notifications
You must be signed in to change notification settings - Fork 460
/
hello-k8s.yml
41 lines (40 loc) · 742 Bytes
/
hello-k8s.yml
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
apiVersion: v1
kind: Service
metadata:
name: hello-k8s
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 8080
selector:
app: hello-k8s
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-k8s
spec:
replicas: 3
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 2
maxSurge: 2
selector:
matchLabels:
app: hello-k8s
template:
metadata:
labels:
app: hello-k8s
spec:
containers:
- name: hello-k8s
image: CONTAINER_IMAGE
securityContext:
privileged: false
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
ports:
- containerPort: 8080