-
Notifications
You must be signed in to change notification settings - Fork 0
/
mvc-deployment-loc.yaml
45 lines (44 loc) · 1.03 KB
/
mvc-deployment-loc.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
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: mvc-deployment
spec:
selector:
matchLabels:
app: mvc
replicas: 2 # tells deployment to run 2 pods matching the template
template:
metadata:
labels:
app: mvc
spec:
containers:
- name: mvc
image: ricafortdocker/products2-store-mvc:v1.1 #ricafortdocker/products-store-mvc:v1.0
ports:
- containerPort: 80
env:
- name: ConnectionStrings__ProductsContext
valueFrom:
secretKeyRef:
name: mssql-secret
key: db-connection-string-secret
#configMapKeyRef:
# name: mssql-connection-configmap
# key: db-connection-string
#restartPolicy: Never
---
apiVersion: v1
kind: Service
metadata:
name: mvc-service
spec:
selector:
app: mvc
ports:
- protocol: TCP
port: 80
#targetPort: 80
nodePort: 30100
type: NodePort
#type: ClusterIP