Skip to content

Instantly share code, notes, and snippets.

@den-vasyliev
Created October 16, 2019 23:14
Show Gist options
  • Save den-vasyliev/089d144b52b99804476bb9feb9331e92 to your computer and use it in GitHub Desktop.
Save den-vasyliev/089d144b52b99804476bb9feb9331e92 to your computer and use it in GitHub Desktop.
api-backend
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: api
name: api
spec:
replicas: 1
selector:
matchLabels:
run: api
template:
metadata:
creationTimestamp: null
labels:
run: api
spec:
containers:
- name: api
image: denvasyliev/smartcity-back:v3.0.0
volumeMounts:
- name: data
mountPath: /data
env:
- name: DIST
valueFrom:
configMapKeyRef:
name: api-conf
key: dist
- name: FLASK_APP
valueFrom:
configMapKeyRef:
name: api-conf
key: flask_app
ports:
- containerPort: 5000
volumes:
- name: data
configMap:
name: api-conf
items:
- key: main.py
path: main.py
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
spec:
rules:
- host: api.web-demo.cloud
http:
paths:
- path: /
backend:
serviceName: api
servicePort: 5000
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment