This page provides instructions on how to update the Kubernetes node labels and
node taints of an existing node pool in a Google Kubernetes Engine (GKE)
Standard cluster by using the GKE API. Kubernetes node
labels are distinct fromGKE cluster and node
labels.
Nodetaintsandlabelsare in the object metadata of Kubernetes nodes. Kubernetes labels are used to
schedule Pods on particular nodes. In contrast, taints can be used to steer Pods
away from particular nodes. For more information, seeConfigure workload
separation in GKE.
Using the GKE API, you can apply updates to the Kubernetes node
labels and node taints of an existing GKE node pool without
re-creating the node pool and disrupting running workloads. The updated node
pool configuration is preserved in GKE, so that future node pool
upgrades and new nodes provisioned in the node pool will use the new
configuration.
For more information about how changes affect the operation of a
GKE cluster, seeManage cluster lifecycle changes to minimize
disruption. For details
about specific changes, see theTypes of changes to a GKE
clustersection.
Updating node labels
To update node labels for a node pool, use the following command:
NODEPOOL_NAME: the name of the node pool to update.
[NODE_LABEL,...]: the desired new node labels (for example,label1=value1,label2=value2).
CLUSTER_NAME: the name of the cluster.
CONTROL_PLANE_LOCATION: the Compute Enginelocationof the control plane of your
cluster. Provide a region for regional clusters, or a zone for zonal clusters.
Updating node taints
To update node taints for a node pool, use the following command:
NODEPOOL_NAME: the name of the node pool to update.
[NODE_TAINT,...]: the desired new node taints (for example,key1=val1:NoSchedule,key2=val2:PreferNoSchedule).
CLUSTER_NAME: the name of the cluster.
CONTROL_PLANE_LOCATION: the Compute Enginelocationof the control plane of your
cluster. Provide a region for regional clusters, or a zone for zonal clusters.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Update node labels and taints for existing node pools\n\n[Standard](/kubernetes-engine/docs/concepts/choose-cluster-mode)\n\n*** ** * ** ***\n\nThis page provides instructions on how to dynamically update the\nnode labels and node taints of an existing node pool in a\nGoogle Kubernetes Engine (GKE) Standard cluster.\n\nYou can also dynamically apply and update [network tags](/vpc/docs/add-remove-network-tags)\nin GKE Autopilot or Standard clusters. For\ninstructions, refer to [Use network tags to apply firewall rules to nodes](/kubernetes-engine/docs/how-to/autopilot-network-tags).\n\nOverview\n--------\n\nNode [taints](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)\nand [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/)\nare in the object metadata of Kubernetes nodes. Labels are used to schedule Pods\non particular nodes, where taints can be used to steer Pods away from them.\n\nUsing the GKE API, you can apply updates on the node\nlabels, and node taints of an existing GKE node pool without\nneeding to recreate the node pool or disrupt running workloads. The updated node\npool configuration is preserved in GKE, so that future node pool\nupgrades and new node provisions in the node pool will use the new configuration.\n| **Warning:** Dynamic configuration changes are limited to these fields: resource manager tags, network tags, node labels and node taints. Any other field changes in the [UpdateNodePool\n| API](/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools/update) will not occur dynamically, and will result in node recreation.\n\nLimitations\n-----------\n\nThere are some limitations for using the GKE API to dynamically\nupdate node pool configurations:\n\n- The version for the node pool must be 1.19.7-gke.1500 or later.\n- The version for the cluster's control plane must be 1.23.4-gke.300 or later to apply updates to node labels or node taints for existing node pools with [cluster autoscaler enabled](/kubernetes-engine/docs/how-to/cluster-autoscaler). For clusters on earlier versions, you can use the following workaround: [Disable autoscaling](/kubernetes-engine/docs/how-to/cluster-autoscaler#disable_autoscaling) on the node pool, and then update the node labels and/or taints. After the updates have been applied, [re-enable autoscaling](/kubernetes-engine/docs/how-to/cluster-autoscaler#enabling_autoscaling_for_an_existing_node_pool).\n\nUpdating node labels\n--------------------\n\nTo update node labels for a node pool, use the following command: \n\n gcloud container node-pools update \u003cvar translate=\"no\"\u003eNODEPOOL_NAME\u003c/var\u003e \\\n --node-labels=\u003cvar translate=\"no\"\u003e[\u003c/var\u003eNODE_LABEL,...] \\\n --cluster=\u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e\n --location=\u003cvar translate=\"no\"\u003eCONTROL_PLANE_LOCATION\u003c/var\u003e\n [GCLOUD_WIDE_FLAG ...]\n\n| **Warning:** This update overwrites any previous user-specified values.\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eNODEPOOL_NAME\u003c/var\u003e: the name of the node pool to update.\n- \u003cvar translate=\"no\"\u003e[NODE_LABEL,...]\u003c/var\u003e: the desired new node labels (for example, `label1=value1,label2=value2`).\n- \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e: the name of the cluster.\n- \u003cvar translate=\"no\"\u003eCONTROL_PLANE_LOCATION\u003c/var\u003e: the Compute Engine [location](/compute/docs/regions-zones#available) of the control plane of your cluster. Provide a region for regional clusters, or a zone for zonal clusters.\n\nUpdating node taints\n--------------------\n\nTo update node taints for a node pool, use the following command: \n\n gcloud container node-pools update \u003cvar translate=\"no\"\u003eNODEPOOL_NAME\u003c/var\u003e \\\n --node-taints=\u003cvar translate=\"no\"\u003e[\u003c/var\u003eNODE_TAINT,...] \\\n --cluster=\u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e\n --location=\u003cvar translate=\"no\"\u003eCONTROL_PLANE_LOCATION\u003c/var\u003e\n [GCLOUD_WIDE_FLAG ...]\n\n| **Warning:** This update overwrites any previous user-specified values.\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eNODEPOOL_NAME\u003c/var\u003e: the name of the node pool to update.\n- \u003cvar translate=\"no\"\u003e[NODE_TAINT,...]\u003c/var\u003e: the desired new node taints (for example, `key1=val1:NoSchedule,key2=val2:PreferNoSchedule`).\n- \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e: the name of the cluster.\n- \u003cvar translate=\"no\"\u003eCONTROL_PLANE_LOCATION\u003c/var\u003e: the Compute Engine [location](/compute/docs/regions-zones#available) of the control plane of your cluster. Provide a region for regional clusters, or a zone for zonal clusters.\n\nWhat's next\n-----------\n\n- Learn about [node taints to control scheduling.](/kubernetes-engine/docs/how-to/node-taints)\n- [Learn about Network tags](/vpc/docs/add-remove-network-tags).\n- [Learn about labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/)"]]