kubectl autoscale
CautionHorizontal autoscaling
kubectl autoscale deploy <name> --min=2 --max=10 --cpu-percent=70
Creates an HPA scaling on CPU; watch it with get hpa. Requires a working metrics-server.
Examples
kubectl get hpaWatch HPA status
Syntax
kubectl autoscale <res> --min=N --max=N --cpu-percent=N / kubectl get hpa
Before you run it
Size min/max against cluster capacity.
Related commands
- kubectl scaleScale replicas
- kubectl topResource usage
The same reference, with no signal at all
Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store