-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver-deployment.yaml
49 lines (49 loc) · 1.04 KB
/
server-deployment.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: server-delpoyment
spec:
replicas: 3
selector:
matchLabels:
component: server
template:
metadata:
labels:
component: server
spec:
containers:
- name: server
image: stephengrider/multi-server
ports:
- containerPort: 5000
env:
- name: REDIS_HOST
value: redis-service
- name: REDIS_PORT
value: '6379'
- name: PGUSER
value: postgres
- name: PGHOST
value: postgres-service
- name: PGPORT
value: '5432'
- name: PGDATABASE
value: postgres
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: pgpassword
key: PGPASSWORD
---
apiVersion: v1
kind: Service
metadata:
name: server-service
spec:
type: ClusterIP
selector:
component: server
ports:
- port: 5000
targetPort: 5000