-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy-demo.yml
40 lines (40 loc) · 964 Bytes
/
deploy-demo.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-python-flask-deployment
spec:
selector:
matchLabels:
app: demo-python-flask
template:
metadata:
labels:
app: demo-python-flask
spec:
containers:
- name: demo-python-flask
image: mydemoregistry.azurecr.io/pythondemo:0.0.1
imagePullPolicy: Always
env:
- name: FLASK_ENV
value: "development"
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: pythondemo-flask-service
spec:
selector:
app: demo-python-flask
type: LoadBalancer
# uncomment this if you have preallocated a static IP address
# loadBalancerIP: a.b.c.d
ports:
- protocol: TCP
port: 80
targetPort: 80
loadBalancerSourceRanges:
# replace e.f.g.h with your public IP address: https://www.whatismyip.com
- e.f.g.h/32