2025-12-16 10:20:31 -07:00
|
|
|
# kubectl autoscale
|
|
|
|
|
|
|
|
|
|
> Create an autoscaler to intelligently scale pod count based on kubernetes cluster demands.
|
2026-02-18 06:55:01 -07:00
|
|
|
> More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_autoscale/>.
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Auto scale a deployment with no target CPU utilization specified:
|
|
|
|
|
|
|
|
|
|
`kubectl autoscale {{[deploy|deployment]}} {{deployment_name}} --min {{min_replicas}} --max {{max_replicas}}`
|
|
|
|
|
|
|
|
|
|
- Auto scale a deployment with target CPU utilization:
|
|
|
|
|
|
|
|
|
|
`kubectl autoscale {{[deploy|deployment]}} {{deployment_name}} --max {{max_replicas}} --cpu-percent {{target_cpu}}`
|