-
Notifications
You must be signed in to change notification settings - Fork 7
/
todofrontend-service.yml
62 lines (59 loc) · 1.13 KB
/
todofrontend-service.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
apiVersion: v1
kind: Service
metadata:
name: todofrontend
labels:
app: todo
tier: frontend
spec:
type: NodePort
ports:
- port: 80
nodePort: 30000
selector:
app: todo
tier: frontend
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: todofrontend
labels:
app: todo
tier: frontend
spec:
replicas: 3
selector:
matchLabels:
app: todo
tier: frontend
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template: # pod definition
metadata:
labels:
app: todo
tier: frontend
spec:
containers:
- name: todofrontend
image: todofrontend:5.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
envFrom:
- configMapRef:
name: config.local
#env:
# - name: TODOAPI_HOST
# value: "localhost"
# - name: TODOAPI_PORT
# value: "30080"
# - name: TODOAPI_PATH
# value: "api/todo"
#dnsPolicy: ClusterFirst
#restartPolicy: Always