forked from yanbiabeu/helloworld19
-
Notifications
You must be signed in to change notification settings - Fork 123
/
Copy pathdeployment.yml
44 lines (43 loc) · 815 Bytes
/
deployment.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
41
42
43
44
## Deployment
---
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: app-dev1
spec:
selector:
matchLabels:
app: app-dev1
replicas: 3 # tells deployment to run 2 pods matching the template
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
template:
metadata:
labels:
app: app-dev1
spec:
containers:
- name: app-dev1
image: kserge2001/gcloud:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
## Service
---
apiVersion: v1
kind: Service
metadata:
name: app-dev-service1
labels:
app: app-dev1
spec:
selector:
app: app-dev1
type: LoadBalancer
ports:
- port: 8080
targetPort: 8080
# nodePort: 31200