Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doctl kubernetes cluster node-pool create mycluster123 --auto-scale --min-nodes 0 --name test --size s-1vcpu-2gb --max-nodes 1 --count 0 says the node pool needs at least min 1 #1516

Open
h0jeZvgoxFepBQ2C opened this issue Mar 21, 2024 · 2 comments
Labels
bug do-api Depends on additional features for the DigitalOcean API

Comments

@h0jeZvgoxFepBQ2C
Copy link

h0jeZvgoxFepBQ2C commented Mar 21, 2024

In your documentation (https://docs.digitalocean.com/reference/doctl/reference/kubernetes/cluster/node-pool/create/) you write:

The minimum number of nodes in the node pool when autoscaling is enabled
Default: 0

wheres when I write following command:

doctl kubernetes cluster node-pool create mycluster123 --auto-scale --min-nodes 0 --name test --size s-1vcpu-2gb --max-nodes 1 --count 0

It returns me:

Error: POST https://api.digitalocean.com/v2/kubernetes/clusters/123123-123123123-123123123-123123/node_pools: 422 (request "123-123-123-123") validation error: worker_node_pool_spec.min nodes must be greater than or equal to 1

Is it not possible to create a nodepool with 0 min nodes? We have a pretty valid usecase: we have some special tasks, which needs huge amounts of RAM/disk space, but we dont want to spend money on a node, which is not utilized at all, when the task is not running.
So we would like to have a nodepool with 0 min-nodes, which then autoscales when a job is running - and deletes the node again afterwards.

At least - the documentation with default 0 - makes no sense if its not allowed?

@h0jeZvgoxFepBQ2C h0jeZvgoxFepBQ2C changed the title doctl kubernetes cluster node-pool create flave-development --auto-scale --min-nodes 0 --name test --size s-1vcpu-2gb --max-nodes 1 --count 0 says the node pool needs at least min 1 doctl kubernetes cluster node-pool create mycluster123 --auto-scale --min-nodes 0 --name test --size s-1vcpu-2gb --max-nodes 1 --count 0 says the node pool needs at least min 1 Mar 21, 2024
@danaelhe
Copy link
Member

Thank you for this write up.

Your use case sounds very valid, but unfortunately our Kubernetes product doesn't support scale-to-zero on any node pools as of right now. I've relayed your use case and feedback to our internal Kubernetes team.

You can only set a minimum number of nodes to 0 if auto-scale is set to false. I'm going to update the doctl documentation to include this vital piece of information.

@danaelhe danaelhe added the do-api Depends on additional features for the DigitalOcean API label Mar 21, 2024
danaelhe added a commit that referenced this issue Mar 21, 2024
Addressing #1516

Adding explicit documentation that minimum node pool size can't not be zero if autoscale is true.
@MrCuPper

This comment was marked as off-topic.

danaelhe added a commit that referenced this issue Apr 1, 2024
* K8s: Update Node Pool documentation 

Addressing #1516

Adding explicit documentation that minimum node pool size can't not be zero if autoscale is true.

* Update kubernetes.go

* update node pool doc

---------

Co-authored-by: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug do-api Depends on additional features for the DigitalOcean API
Projects
None yet
Development

No branches or pull requests

3 participants