digitalocean / digitalocean/doctl

Unable to remove the label from the Kubernetes cluster node pool.

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

Description

Unable to remove the label for the Kubernetes cluster node pool.

For adding a persistent node label to the Kubernetes worker nodes, we need to label the node pool using doctl. Once the label has been added how to remove it?

The documentation says the omitted labels will be removed. But how to remove the last label?

For example, if we use the below command to add 3 labels to the node pool.

`doctl kubernetes cluster node-pool update --label key1=value1,key2=value2,key3=value3`

We can remove the label key2=value2,key3=value3 using the below command
`doctl kubernetes cluster node-pool update --label key1=value1`

But how to remove key1=value1 label? The below command doesn't work.
`doctl kubernetes cluster node-pool update --label`

The label can be removed using the API call but using doctl it seems there isn't a way.
```
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer " \
-d '{"name": " ","count": 3, "tags":["null"], "labels": {}}' \
"https://api.digitalocean.com/v2/kubernetes/clusters//node_pools/"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.