I created GKE cluster with node pool, but I forgot to label the nodes... In Google Cloud Platform UI I can't edit or add Kubernetes labels for the existing node pool... How can I do it without recreating whole node pool?
You can edit your node configuration, including labels, with kubectl
:
kubectl edit node <your node name>
Use kubectl get node
to get a list of your nodes. If you're having trouble connecting to your GKE cluster check out the docs here.
It isn't possible to edit the labels without recreating nodes, so GKE does not support updating labels on node pools.
In GKE, the Kubernetes labels are applied to nodes by the kubelet
binary which receives them as flags passed in via the node startup script. As it is just as disruptive (or more disruptive) to recreate all nodes in a node pool as to create a new node pool, updating the labels isn't a supported operation for updating a node pool.