Horizontal Pod Autoscaler Operations: Difference between revisions
Jump to navigation
Jump to search
Line 6: | Line 6: | ||
=Create an Autoscaler= | =Create an Autoscaler= | ||
==With CLI== | ==CPU-Based Autoscaler== | ||
For the autoscaler to work, the pods subject to autoscaling must have their [[Kubernetes_Resource_Management_Concepts#CPU_Request|CPU requests]] set. | |||
===With CLI=== | |||
<syntaxhighlight lang='text'> | <syntaxhighlight lang='text'> | ||
kubectl autoscale deployment <deployment-name> --cpu-percent=50 --min=1 --max=10 | kubectl autoscale deployment <deployment-name> --cpu-percent=50 --min=1 --max=10 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==With Metadata== | ===With Metadata=== |
Revision as of 19:33, 12 October 2020
Internal
Playground
Create an Autoscaler
CPU-Based Autoscaler
For the autoscaler to work, the pods subject to autoscaling must have their CPU requests set.
With CLI
kubectl autoscale deployment <deployment-name> --cpu-percent=50 --min=1 --max=10