Kubernetes autoscaler min of 0?

I have workloads that are intermittent and heterogeneous. Sometimes a k8s job will be scheduled to run on a pod that needs 400m memory, another time it’ll be a job that requires 24g of memory. What I want to have happen is for the autoscaler to automatically spin up a droplet (node) that’ll be able to run that pod.

Most of the time there’ll be no jobs, so it doesn’t make sense to have nodes running at those times.

It’s fine if takes a minute or two for a node to come up for the job to run.

It’s fine if the node stays up for some minimum amount of time before it shuts off (e.g. an hour).

Is there anyway to have the autoscaler scale a node group to 0?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @offbynull!

Unfortunately, it is not currently supported to set the autoscaling of a nodepool to 0.

You can see this mentioned in our product docs here How to Enable the Cluster Autoscaler for a DigitalOcean Kubernetes Cluster

Minimum Nodes: Determines the smallest size the cluster will be allowed to “scale down” to; must be no less than 1 and no greater than Maximum Nodes.

That being said, there could be a way to automate this yourself using the DO API! See the API docs for controlling node count here:

Hope this was helpful!