digitalocean / digitalocean/doctl

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

Open
#1,516 2 comments 2 reactions 0 assignees View on GitHub
bug do-api
Dominant language
Go
Stars
3.4k
Forks
496
Avg merge
1d 2h
Merged PRs (30d)
31

Description

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:

```shell
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?

Contributor guide

Open the contributing guide

Research direction

Start with the doctl Kubernetes node-pool create command and compare its --min-nodes defaults and validation with the referenced documentation. Reproduce the command against the API response shown; done when the allowed minimum is confirmed and the CLI documentation or behavior accurately reflects it.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, shell
Domain
cli, cloud, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.