Skip to content

Instantly share code, notes, and snippets.

@udhos
Last active April 6, 2021 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save udhos/0387c91ab284136baebd8319d34096e6 to your computer and use it in GitHub Desktop.
Save udhos/0387c91ab284136baebd8319d34096e6 to your computer and use it in GitHub Desktop.
hpa
kubectl -n sample autoscale deploy web --min=2 --max=5 --cpu-percent=80 --dry-run=client -o yaml
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: web
spec:
maxReplicas: 5
minReplicas: 2
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: web
targetCPUUtilizationPercentage: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment