-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy-app.yml
51 lines (46 loc) · 976 Bytes
/
deploy-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
46
47
48
49
50
51
apiVersion: v1
kind: ConfigMap
metadata:
name: payment-gateway-config
data:
SPRING_DATASOURCE_URL: 'jdbc:mysql://payment-gateway-mysql:3306/payment_gateway'
SPRING_DATASOURCE_USERNAME: 'root'
SPRING_DATASOURCE_PASSWORD: 'password'
---
# app-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: payment-gateway
spec:
replicas: 3
selector:
matchLabels:
app: payment-gateway
template:
metadata:
labels:
app: payment-gateway
spec:
containers:
- name: payment-gateway
image: payment-gateway:0.0.1-SNAPSHOT
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8081
envFrom:
- configMapRef:
name: payment-gateway-config
---
# app-service.yaml
apiVersion: v1
kind: Service
metadata:
name: payment-gateway
spec:
type: LoadBalancer
selector:
app: payment-gateway
ports:
- port: 8081
targetPort: 8081