JAEN

Kubernetes

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

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store