codegurukool.com · Free coding tutorials & online compiler

Home › Kubernetes Tutorial › Autoscaling

Autoscaling

Add and remove Pods automatically.

The Horizontal Pod Autoscaler changes the replica count of a Deployment based on CPU use or other metrics. It needs the metrics-server add-on and CPU requests on the containers.

Example code

kubectl autoscale deployment web --cpu-percent=70 --min=2 --max=10

Run this code in the online editor

← RBAC and service accountsHelm: the package manager →