Autoscale on Kubernetes

Autoscale applications on Kubernetes

Here a simple way to autoscale applications on your Kubernetes Cluster.

kubectl autoscale deployment -n=searxng searxng --cpu-percent=20 --min=2 --max=3

Here I autoscale my SearXNG Search Engine so I have min. 2 running and max. 3.

The autoscaler will ensure enough instances are running to maintain an avarage CPU usage across all instances.

To change or remove the autoscaling can you take a look on this command.

kubectl get hpa -n=searxng

Here you can see the autoscaling for the namespace searxng.

To delete the autoscaling use this.

kubectl delete hpa searxng -n=searxng