-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.yml
46 lines (45 loc) · 834 Bytes
/
app.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
apiVersion: v1
kind: Service
metadata:
name: app
spec:
ports:
- port: 80
targetPort: 8080
protocol: TCP
name: admin
- port: 8090
protocol: TCP
name: app
selector:
app: app
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: app
spec:
selector:
matchLabels:
app: app
replicas: 1
template:
metadata:
labels:
app: app
spec:
containers:
- name: app
image: strongjz/golang_example:0.0.2
ports:
- containerPort: 8080
- containerPort: 8090
env:
- name: DB_HOST
value: "postgres"
- name: DB_USER
value: "postgres"
- name: DB_PASSWORD
value: "mysecretpassword"
- name: DB_PORT
value: "5432"