-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.yaml
50 lines (50 loc) · 1012 Bytes
/
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-deployment
labels:
app: api
spec:
replicas: 1
selector:
matchLabels:
app: api
template:
metadata:
labels:
app: api
spec:
containers:
- name: api
image: daffaalex22/seleksi_deall:1.0.3
ports:
- containerPort: 8080
env:
- name: DB_USER
value: root
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: mysql-secrets
key: mysql-password
- name: DB_URL
valueFrom:
configMapKeyRef:
name: mysql-config-new
key: mysql-url
- name: DB_NAME
value: seleksi
---
apiVersion: v1
kind: Service
metadata:
name: api-service
spec:
type: NodePort
selector:
app: api
ports:
- protocol: TCP
port: 8080
targetPort: 8080
nodePort: 30101