-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathjakartaee-cafe.yml
42 lines (42 loc) · 894 Bytes
/
jakartaee-cafe.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: jakartaee-cafe
namespace: default
spec:
replicas: 2
selector:
matchLabels:
app: jakartaee-cafe
template:
metadata:
name: jakartaee-cafe
labels:
app: jakartaee-cafe
spec:
containers:
- name: jakartaee-cafe
env:
- name: POSTGRES_USER
valueFrom:
configMapKeyRef:
name: postgres-config
key: postgres_user
- name: POSTGRES_PASSWORD
valueFrom:
configMapKeyRef:
name: postgres-config
key: postgres_password
image: <your Docker Hub account>/jakartaee-cafe:v1
---
apiVersion: v1
kind: Service
metadata:
name: jakartaee-cafe
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 9080
selector:
app: jakartaee-cafe