-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yml
35 lines (35 loc) · 900 Bytes
/
deployment.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: ms-stock-service
labels:
app: ms-stock-service
spec:
replicas: 3
selector:
matchLabels:
app: ms-stock-service
template:
metadata:
labels:
app: ms-stock-service
spec:
serviceAccountName: spring-cloud-kubernetes
containers:
- name: ms-stock-service
image: ms-stock-service:latest
ports:
- containerPort: 8091
imagePullPolicy: Never
env:
- name: SPRING_CLOUD_BOOTSTRAP_ENABLED
value: "true"
- name: SPRING_CLOUD_KUBERNETES_SECRETS_ENABLEAPI
value: "true"
- name: SPRING_PROFILES_ACTIVE
value: k8s
- name: HOST_IP
valueFrom:
configMapKeyRef:
name: ms-stock-service
key: HOST_IP