-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprogramming-languages-api.yaml
52 lines (51 loc) · 1.11 KB
/
programming-languages-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
apiVersion: apps/v1
kind: Deployment
metadata:
name: programming-languages-api
spec:
selector:
matchLabels:
app: programming-languages-api
template:
metadata:
labels:
app: programming-languages-api
spec:
containers:
- name: programming-languages-api
image: sertanmay/programming-languages-api:v1
resources:
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: 8080
env:
- name: DB_HOST
valueFrom:
configMapKeyRef:
name: mariadb-configmap
key: database_url
- name: DB_USER
value: root
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: mariadb-secret
key: mariadb-root-password
- name: DB_NAME
value: k8s_assignment
---
apiVersion: v1
kind: Service
metadata:
name: programming-languages-api-service
spec:
selector:
app: programming-languages-api
type: LoadBalancer
ports:
- protocol: TCP
port: 8080
targetPort: 3000
nodePort: 30001