Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to turn off autoscaling in Kubernetes with the kubectl command?

Tags:

If I set to autoscale a deployment using the kubectl autoscale command (http://kubernetes.io/docs/user-guide/kubectl/kubectl_autoscale/), how can I turn it off an go back to manual scaling?

like image 733
Jon Avatar asked Oct 04 '16 16:10

Jon


People also ask

How do you check auto scaling in Kubernetes?

We can check the status of autoscaler by running the $kubclt get hpa command. We will increase the load on the pods using the following command. We can check the hpa by running $ kubectl get hpa command. We can check the number of pods running using the following command.

What is kubectl autoscale?

"Kubernetes autoscaling helps optimize resource usage and costs by automatically scaling a cluster up and down in line with demand." “Kubernetes autoscaling helps optimize resource usage and costs by automatically scaling a cluster up and down in line with demand,” says Fei Huang, CSO at NeuVector.


1 Answers

When you autoscale, it creates a HorizontalPodScaler.

You can delete it by:

kubectl delete hpa NAME-OF-HPA.

You can get NAME-OF-HPA from:

kubectl get hpa.

like image 112
Tony Avatar answered Sep 19 '22 16:09

Tony