Open ChandanSagar opened 1 year ago
There is a related CLI flag --taint
where we solved this in one particular way. We could copy the pattern for labels.
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.