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

Jon picture Jon · Oct 4, 2016 · Viewed 11.8k times · Source

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?

Answer

Tony picture Tony · Oct 4, 2016

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.