-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodo-ui-api.yaml
76 lines (76 loc) · 1.41 KB
/
todo-ui-api.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: todo-api
namespace: todo
spec:
replicas: 2
selector:
matchLabels:
app: todo-api
template:
metadata:
name: todo-api-pod
labels:
app: todo-api
spec:
containers:
- name: todo-api
image: pavanelthepu/todo-api:1.0.2
ports:
- containerPort: 8082
env:
- name: "spring.data.mongodb.uri"
value: "mongodb+srv://root:[email protected]/todo?retryWrites=true&w=majority"
---
apiVersion: v1
kind: Service
metadata:
name: todo-api-service
namespace: todo
spec:
selector:
app: todo-api
ports:
- name: http
protocol: TCP
port: 8080
targetPort: 8082
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: todo-ui
namespace: todo
spec:
replicas: 2
selector:
matchLabels:
app: todo-ui
template:
metadata:
name: todo-ui-pod
labels:
app: todo-ui
spec:
containers:
- name: todo-ui
image: pavanelthepu/todo-ui:1.0.2
ports:
- containerPort: 80
env:
- name: "REACT_APP_BACKEND_SERVER_URL"
value: "http://todo.com/api"
---
apiVersion: v1
kind: Service
metadata:
name: todo-ui-service
namespace: todo
spec:
selector:
app: todo-ui
ports:
- name: http
port: 3001
targetPort: 80