Skip to content

Instantly share code, notes, and snippets.

@r4rohan
Last active May 31, 2020 15:10
Show Gist options
  • Save r4rohan/854bea3ff3ef4ee9cb20d74517291344 to your computer and use it in GitHub Desktop.
Save r4rohan/854bea3ff3ef4ee9cb20d74517291344 to your computer and use it in GitHub Desktop.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: python-app
labels:
name: python-app
spec:
replicas: 1
minReadySeconds: 60
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
name: python-app
spec:
containers:
- name: test
image: cloudorbit.azurecr.io/python-app
imagePullPolicy: Always
---
kind: Service
apiVersion: v1
metadata:
name: python-app
spec:
selector:
name: python-app
ports:
- name: port1
protocol: TCP
port: 5000
targetPort: 5000
type: LoadBalancer
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: python-app
spec:
maxReplicas: 3
minReplicas: 1
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: Deployment
name: python-app
targetCPUUtilizationPercentage: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment