mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
18 lines
657 B
Plaintext
18 lines
657 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# kubectl autoscale
|
|
|
|
> Create an autoscaler to intelligently scale pod count based on kubernetes cluster demands.
|
|
> More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_autoscale/>.
|
|
|
|
- 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}}`
|