-
Notifications
You must be signed in to change notification settings - Fork 0
/
multiappdemo.yaml
77 lines (77 loc) · 1.27 KB
/
multiappdemo.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
74
75
76
77
apiVersion: v1
kind: Service
metadata:
name: backend-svc
spec:
ports:
- name: http
port: 8081
protocol: TCP
targetPort: 8081
selector:
app: backend
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
name: frontend-svc
spec:
ports:
- name: http
nodePort: 30080
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: frontend
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend
spec:
replicas: 1
selector:
matchLabels:
app: backend
version: v1
template:
metadata:
labels:
app: backend
version: v1
spec:
containers:
- image: cbron/multiappdemo-backend:latest
imagePullPolicy: Always
name: app
ports:
- containerPort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
spec:
replicas: 1
selector:
matchLabels:
app: frontend
version: v1
template:
metadata:
labels:
app: frontend
version: v1
spec:
containers:
- env:
- name: BACKEND
value: http://backend-svc:8081
image: cbron/multiappdemo-frontend:latest
imagePullPolicy: Always
name: app
ports:
- containerPort: 8080