Stay organized with collections Save and categorize content based on your preferences.
This page provides instructions on how to dynamically update the node labels and node taints of an existing node pool in a Google Kubernetes Engine (GKE) Standard cluster.
You can also dynamically apply and update network tags in GKE Autopilot or Standard clusters. For instructions, refer to Use network tags to apply firewall rules to nodes.
OverviewNode taints and labels are in the object metadata of Kubernetes nodes. Labels are used to schedule Pods on particular nodes, where taints can be used to steer Pods away from them.
Using the GKE API, you can apply updates on the node labels, and node taints of an existing GKE node pool without needing to recreate the node pool or disrupt running workloads. The updated node pool configuration is preserved in GKE, so that future node pool upgrades and new node provisions in the node pool will use the new configuration.
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 API will not occur dynamically, and will result in node recreation. LimitationsThere are some limitations for using the GKE API to dynamically update node pool configurations:
To update node labels for a node pool, use the following command:
gcloud container node-pools update NODEPOOL_NAME \
--node-labels=[NODE_LABEL,...] \
--cluster=CLUSTER_NAME
--location=CONTROL_PLANE_LOCATION
[GCLOUD_WIDE_FLAG …]
Warning: This update overwrites any previous user-specified values.
Replace the following:
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 Engine location of the control plane of your cluster. Provide a region for regional clusters, or a zone for zonal clusters.To update node taints for a node pool, use the following command:
gcloud container node-pools update NODEPOOL_NAME \
--node-taints=[NODE_TAINT,...] \
--cluster=CLUSTER_NAME
--location=CONTROL_PLANE_LOCATION
[GCLOUD_WIDE_FLAG …]
Warning: This update overwrites any previous user-specified values.
Replace the following:
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 Engine location of the control plane of your cluster. Provide a region for regional clusters, or a zone for zonal clusters.Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-12 UTC.
[[["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-12 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4