digitalocean / doctl

The official command line interface for the DigitalOcean API.
https://docs.digitalocean.com/reference/doctl/
Apache License 2.0
3.26k stars 394 forks source link

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 7 months ago

h0jeZvgoxFepBQ2C commented 7 months ago

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?

danaelhe commented 7 months ago

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.

MrCuPper commented 7 months ago

Actually I don't know what I does, I just interesting programming experience but I couldn't get required construction for learning or pay for college, so I just trying to make something at all,

On Thu, Mar 21, 2024, 20:55 danaelhe @.***> wrote:

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.

— Reply to this email directly, view it on GitHub https://github.com/digitalocean/doctl/issues/1516#issuecomment-2013122770, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCZN2V6UAFIAFOXLKVVNOPLYZMJZJAVCNFSM6AAAAABFBVAWBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJTGEZDENZXGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>