You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
We can remove the label key2=value2,key3=value3 using the below command doctl kubernetes cluster node-pool update <cluster name> <pool name/id> --label key1=value1
But how to remove key1=value1 label? The below command doesn't work. doctl kubernetes cluster node-pool update <cluster name> <pool name/id> --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 <token>" \
-d '{"name": "<node pool name> ","count": 3, "tags":["null"], "labels": {}}' \
"https://api.digitalocean.com/v2/kubernetes/clusters/<cluster ID>/node_pools/<node pool id>"
The text was updated successfully, but these errors were encountered:
Some extra context: the issue is that we use a map[string]string with an omitempty JSON tag in godo, meaning that an empty label map is not encoded.
A fix that does not involve a breaking change would require something like an extra field and/or a customer json.Marshaler implementation to handle the clear label case (possibly accompanied by a helper method). Details are to be determined.
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 <cluster name> <pool name/id> --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 <cluster name> <pool name/id> --label key1=value1
But how to remove key1=value1 label? The below command doesn't work.
doctl kubernetes cluster node-pool update <cluster name> <pool name/id> --label
The label can be removed using the API call but using doctl it seems there isn't a way.
The text was updated successfully, but these errors were encountered: