Skip to content

Instantly share code, notes, and snippets.

@NL-TCH
Last active April 9, 2022 13:53
Show Gist options
  • Save NL-TCH/5932a14144e33adcd1f4637796cf0e15 to your computer and use it in GitHub Desktop.
Save NL-TCH/5932a14144e33adcd1f4637796cf0e15 to your computer and use it in GitHub Desktop.
kubectl run -i --tty load-generator --rm --image=busybox:1.28 --restart=Never -- /bin/sh -c "while sleep 0.01; do wget -q -O- http://webserver; done"
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: webserver-deployment
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: webserver-deployment
minReplicas: 1
maxReplicas: 10
targetCPUUtilizationPercentage: 50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment