gcloud container clusters update NAME (--anonymous-authentication-config=ANONYMOUS_AUTHENTICATION_CONFIG | --autopilot-general-profile=AUTOPILOT_GENERAL_PROFILE | --autopilot-privileged-admission=[ALLOWLIST_PATHS,…] | --autopilot-workload-policies=WORKLOAD_POLICIES | --autoprovisioning-cgroup-mode=AUTOPROVISIONING_CGROUP_MODE | --autoprovisioning-enable-insecure-kubelet-readonly-port | --autoprovisioning-network-tags=[TAGS,…] | --autoprovisioning-resource-manager-tags=[KEY=VALUE,…] | --autoscaling-profile=AUTOSCALING_PROFILE | --complete-credential-rotation | --complete-ip-rotation | --containerd-config-from-file=PATH_TO_FILE | --control-plane-egress=CONTROL_PLANE_EGRESS | --database-encryption-key=DATABASE_ENCRYPTION_KEY | --disable-database-encryption | --disable-default-snat | --disable-multi-nic-lustre | --disable-workload-identity | --enable-agent-sandbox | --[no-]enable-autopilot-compatibility-auditing | --enable-autoscaling | --[no-]enable-cilium-clusterwide-network-policy | --enable-cost-allocation | --enable-default-compute-class | --enable-fqdn-network-policy | --enable-identity-service | --enable-image-streaming | --enable-insecure-kubelet-readonly-port | --enable-intra-node-visibility | --enable-kernel-module-signature-enforcement | --enable-kubernetes-unstable-apis=API,[API,…] | --enable-l4-ilb-subsetting | --enable-legacy-authorization | --enable-legacy-lustre-port | --enable-multi-networking | --enable-network-policy | --enable-private-nodes | --enable-service-externalips | --enable-shielded-nodes | --enable-stackdriver-kubernetes | --enable-vertical-pod-autoscaling | --gateway-api=GATEWAY_API | --generate-password | --hpa-profile=HPA_PROFILE | --in-transit-encryption=IN_TRANSIT_ENCRYPTION | --logging-variant=LOGGING_VARIANT | --maintenance-window=START_TIME | --network-performance-configs=[PROPERTY1=VALUE1,…] | --node-creation-mode=NODE_CREATION_MODE | --node-locations=ZONE,[ZONE,…] | --notification-config=[pubsub=ENABLED|DISABLED,pubsub-topic=TOPIC,…] | --patch-update=[PATCH_UPDATE] | --private-ipv6-google-access-type=PRIVATE_IPV6_GOOGLE_ACCESS_TYPE | --release-channel=CHANNEL | --remove-autopilot-workload-policies=REMOVE_WORKLOAD_POLICIES | --remove-labels=[KEY,…] | --remove-workload-policies=REMOVE_WORKLOAD_POLICIES | --security-group=SECURITY_GROUP | --security-posture=SECURITY_POSTURE | --set-password | --stack-type=STACK_TYPE | --start-credential-rotation | --start-ip-rotation | --tier=TIER | --update-addons=[ADDON=ENABLED|DISABLED,…] | --update-labels=[KEY=VALUE,…] | --workload-policies=WORKLOAD_POLICIES | --workload-pool=WORKLOAD_POOL | --workload-vulnerability-scanning=WORKLOAD_VULNERABILITY_SCANNING | --additional-ip-ranges=[subnetwork=NAME,pod-ipv4-range=NAME,…] --remove-additional-ip-ranges=[subnetwork=NAME,pod-ipv4-range=NAME,…] | --additional-pod-ipv4-ranges=NAME,[NAME,…] --remove-additional-pod-ipv4-ranges=NAME,[NAME,…] | --auto-monitoring-scope=AUTO_MONITORING_SCOPE --logging=[COMPONENT,…] --monitoring=[COMPONENT,…] --disable-managed-prometheus | --enable-managed-prometheus | --binauthz-evaluation-mode=BINAUTHZ_EVALUATION_MODE | --enable-binauthz | --clear-fleet-project --enable-fleet --fleet-project=PROJECT_ID_OR_NUMBER --membership-type=MEMBERSHIP_TYPE --unset-membership-type | --clear-maintenance-minor-version-disruption-interval | --maintenance-minor-version-disruption-interval=MAINTENANCE_MINOR_VERSION_DISRUPTION_INTERVAL --clear-maintenance-patch-version-disruption-interval | --maintenance-patch-version-disruption-interval=MAINTENANCE_PATCH_VERSION_DISRUPTION_INTERVAL | --clear-maintenance-window | --remove-maintenance-exclusion=NAME | [(--add-maintenance-exclusion-end=TIME_STAMP | --add-maintenance-exclusion-until-end-of-support) : --add-maintenance-exclusion-name=NAME --add-maintenance-exclusion-scope=SCOPE --add-maintenance-exclusion-start=TIME_STAMP] | --maintenance-window-recurrence=RRULE --maintenance-window-start=TIME_STAMP (--maintenance-window-duration=PT1H23M45S | --maintenance-window-end=TIME_STAMP) | --clear-resource-usage-bigquery-dataset | --enable-network-egress-metering --enable-resource-consumption-metering --resource-usage-bigquery-dataset=RESOURCE_USAGE_BIGQUERY_DATASET | --cluster-dns=CLUSTER_DNS --cluster-dns-domain=CLUSTER_DNS_DOMAIN --cluster-dns-scope=CLUSTER_DNS_SCOPE --additive-vpc-scope-dns-domain=ADDITIVE_VPC_SCOPE_DNS_DOMAIN | --disable-additive-vpc-scope | --dataplane-v2-observability-mode=DATAPLANE_V2_OBSERVABILITY_MODE | --disable-dataplane-v2-flow-observability | --enable-dataplane-v2-flow-observability --disable-dataplane-v2-metrics | --enable-dataplane-v2-metrics | --disable-auto-ipam | --enable-auto-ipam | --disable-l4-lb-firewall-reconciliation | --enable-l4-lb-firewall-reconciliation | --disable-pod-snapshots | --enable-pod-snapshots | --enable-authorized-networks-on-private-endpoint --enable-dns-access --enable-google-cloud-access --enable-ip-access --enable-k8s-certs-via-dns --enable-k8s-tokens-via-dns --enable-master-global-access --enable-private-endpoint --enable-master-authorized-networks --master-authorized-networks=NETWORK,[NETWORK,…] | --enable-autoprovisioning --autoprovisioning-config-file=PATH_TO_FILE | --autoprovisioning-image-type=AUTOPROVISIONING_IMAGE_TYPE --autoprovisioning-locations=ZONE,[ZONE,…] --autoprovisioning-min-cpu-platform=PLATFORM --max-cpu=MAX_CPU --max-memory=MAX_MEMORY --min-cpu=MIN_CPU --min-memory=MIN_MEMORY --autoprovisioning-max-surge-upgrade=AUTOPROVISIONING_MAX_SURGE_UPGRADE --autoprovisioning-max-unavailable-upgrade=AUTOPROVISIONING_MAX_UNAVAILABLE_UPGRADE --autoprovisioning-node-pool-soak-duration=AUTOPROVISIONING_NODE_POOL_SOAK_DURATION --autoprovisioning-standard-rollout-policy=[batch-node-count=BATCH_NODE_COUNT,batch-percent=BATCH_NODE_PERCENTAGE,batch-soak-duration=BATCH_SOAK_DURATION,…] --enable-autoprovisioning-blue-green-upgrade | --enable-autoprovisioning-surge-upgrade --autoprovisioning-scopes=[SCOPE,…] --autoprovisioning-service-account=AUTOPROVISIONING_SERVICE_ACCOUNT --enable-autoprovisioning-autorepair --enable-autoprovisioning-autoupgrade [--max-accelerator=[type=TYPE,count=COUNT,…] : --min-accelerator=[type=TYPE,count=COUNT,…]] | --enable-insecure-binding-system-authenticated --enable-insecure-binding-system-unauthenticated | --logging-service=LOGGING_SERVICE --monitoring-service=MONITORING_SERVICE | --[no-]enable-ray-cluster-logging --[no-]enable-ray-cluster-monitoring | --[no-]enable-secret-manager --[no-]enable-secret-manager-rotation --secret-manager-rotation-interval=SECRET_MANAGER_ROTATION_INTERVAL | --[no-]enable-secret-sync --[no-]enable-secret-sync-rotation --secret-sync-rotation-interval=SECRET_SYNC_ROTATION_INTERVAL | --password=PASSWORD --enable-basic-auth | --username=USERNAME, -u USERNAME) [--async] [--cloud-run-config=[load-balancer-type=EXTERNAL,…]] [--node-pool=NODE_POOL] [--location=LOCATION | --region=REGION | --zone=ZONE, -z ZONE] [--location-policy=LOCATION_POLICY --max-nodes=MAX_NODES --min-nodes=MIN_NODES --total-max-nodes=TOTAL_MAX_NODES --total-min-nodes=TOTAL_MIN_NODES] [GCLOUD_WIDE_FLAG …]
gcloud container clusters update sample-cluster --enable-autoscalingNAME--anonymous-authentication-config=ANONYMOUS_AUTHENTICATION_CONFIGANONYMOUS_AUTHENTICATION_CONFIG must be one of:
ENABLEDLIMITED--autopilot-general-profile=AUTOPILOT_GENERAL_PROFILEnone and no-performance. If none is used,
the cluster will use the Autopilot default configuration.
AUTOPILOT_GENERAL_PROFILE must be one of:
none, no-performance.
--autopilot-privileged-admission=[ALLOWLIST_PATHS,…]The value is a comma-separated list of paths in the format:
gke://<partner_name>/<app_name>/<allowlist_path>
for Autopilot partner allowlists
gs://<bucket_name>/<allowlist_path> for user allowlists
By default, all GKE-managed allowlists (gke://*) are authorized.
See https://cloud.google.com/kubernetes-engine/docs/resources/autopilot-partners
for all supported Autopilot partner allowlists. When setting this flag, be
careful to explicitly specify gke://* in addition to other entries
if you rely on this default behavior.
Wildcards (*) are supported. For example, if gke://*
is authorized, then AllowlistSynchronizers can be used to install
gke://partner1/allowlist1.yaml and
gke://partner2/allowlist2.yaml.
Note: Use of user allowlists (gs://) requires special permissions
and is only available to a subset of high tier customers. Please contact your
account team for more information.
Examples:
Allow all GKE-managed allowlists (default behavior):
gcloud container clusters update --autopilot-privileged-admission=gke://*Authorize only allowlists from a GKE Autopilot partner:
gcloud container clusters update --autopilot-privileged-admission=gke://my-partner/*Authorize only a singular user-owned allowlist
gcloud container clusters update --autopilot-privileged-admission=gs://my-bucket/allowlists/my-allowlist.yamlAuthorize all user-owned allowlists under a given path:
gcloud container clusters update --autopilot-privileged-admission=gs://my-bucket/*Authorize all GKE-managed allowlists and a specific user-owned allowlist:
gcloud container clusters update --autopilot-privileged-admission=gke://*,gs://my-bucket/allowlists/my-allowlist.yamlDisable allowlist installation entirely:
gcloud container clusters update --autopilot-privileged-admission=""Exercise caution when using this flag on an existing cluster. Upon updates, existing AllowlistSynchronizers will uninstall allowlists that are no longer authorized.
For instructions on installing allowlists in the cluster after authorization, please refer to: https://cloud.google.com/kubernetes-engine/docs/how-to/run-autopilot-partner-workloads--autopilot-workload-policies=WORKLOAD_POLICIESExamples:
gcloud container clusters update example-cluster --autopilot-workload-policies=allow-net-admin--autoprovisioning-cgroup-mode=AUTOPROVISIONING_CGROUP_MODEUpdating this flag triggers an update using surge upgrades of all existing auto-provisioned nodes to apply the new value of cgroup mode.
For an Autopilot cluster, the specified cgroup mode will be set on all existing and new nodes in the cluster. For a Standard cluster, the specified cgroup mode will be set on all existing and new auto-provisioned node pools in the cluster.
If not set, GKE uses cgroupv2 for new nodes when the cluster was created running
1.26 or later, and cgroupv1 for clusters created running 1.25 or earlier. To
check your initial cluster version, run gcloud container clusters describe
[NAME] --format="value(initialClusterVersion)"
For clusters created running version 1.26 or later, you can't set the cgroup mode to v1.
To learn more, see: https://cloud.google.com/kubernetes-engine/docs/how-to/migrate-cgroupv2.
AUTOPROVISIONING_CGROUP_MODE must be one of:
default, v1, v2.
--autoprovisioning-enable-insecure-kubelet-readonly-portIf not set, the value from nodePoolDefaults.nodeConfigDefaults will be used.
To disable the readonly port--no-autoprovisioning-enable-insecure-kubelet-readonly-port.
--autoprovisioning-network-tags=[TAGS,…]Examples:
gcloud container clusters update example-cluster --autoprovisioning-network-tags=tag1,tag2--autoprovisioning-resource-manager-tags=[KEY=VALUE,…]For a Standard cluster, the specified comma-separated resource manager tags that has the GCE_FIREWALL purpose are applied to all nodes in the new newly created auto-provisioned node pools. Existing auto-provisioned node pools retain the tags that they had before the update. To update tags on an existing auto-provisioned node pool, use the node pool level flag '--resource-manager-tags'.
Examples:
gcloud container clusters update example-cluster --autoprovisioning-resource-manager-tags=tagKeys/1234=tagValues/2345gcloud container clusters update example-cluster --autoprovisioning-resource-manager-tags=my-project/key1=value1gcloud container clusters update example-cluster --autoprovisioning-resource-manager-tags=12345/key1=value1,23456/key2=value2gcloud container clusters update example-cluster --autoprovisioning-resource-manager-tags=
--autoscaling-profile=AUTOSCALING_PROFILE--complete-credential-rotationgcloud container clusters update example-cluster --complete-credential-rotation--complete-ip-rotationgcloud container clusters update example-cluster --complete-ip-rotation--containerd-config-from-file=PATH_TO_FILEFor detailed information on the configuration usage, please refer to https://cloud.google.com/kubernetes-engine/docs/how-to/customize-containerd-configuration.
Note: Updating the containerd configuration of an existing cluster or node pool requires recreation of the existing nodes, which might cause disruptions in running workloads.
Use a full or relative path to a local file containing the value of containerd_config.--control-plane-egress=CONTROL_PLANE_EGRESSCONTROL_PLANE_EGRESS
must be one of:
NONEclientConfig.url will be disabled. Essential GKE-managed services
are still permitted to function via an internal allowlist.
VIA_CONTROL_PLANE--database-encryption-key=DATABASE_ENCRYPTION_KEYprojects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME].
For more information, see https://cloud.google.com/kubernetes-engine/docs/how-to/encrypting-secrets.
--disable-database-encryption--disable-default-snatBy default, cluster nodes perform source network address translation (SNAT) for packets sent from Pod IP address sources to destination IP addresses that are not in the non-masquerade CIDRs list. For more details about SNAT and IP masquerading, see: https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent#how_ipmasq_works SNAT changes the packet's source IP address to the node's internal IP address.
When this flag is set, GKE does not perform SNAT for packets sent to any destination. You must set this flag if the cluster uses privately reused public IPs.
The --disable-default-snat flag is only applicable to private GKE clusters, which are inherently VPC-native. Thus, --disable-default-snat requires that the cluster was created with both --enable-ip-alias and --enable-private-nodes.--disable-multi-nic-lustre--disable-workload-identityFor more information on Workload Identity, see
https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
--enable-agent-sandbox--no-enable-agent-sandbox to disable.
--[no-]enable-autopilot-compatibility-auditingNote: This flag causes a control plane restart.
Use--enable-autopilot-compatibility-auditing to enable and
--no-enable-autopilot-compatibility-auditing to disable.
--enable-autoscaling--[no-]enable-cilium-clusterwide-network-policy--enable-cilium-clusterwide-network-policy to enable and
--no-enable-cilium-clusterwide-network-policy to disable.
--enable-cost-allocationWhen enabled, you can get informational GKE cost breakdowns by cluster, namespace and label in your billing data exported to BigQuery (https://cloud.google.com/billing/docs/how-to/export-data-bigquery).
Use --no-enable-cost-allocation to disable this feature.--enable-default-compute-class--no-enable-default-compute-class.
--enable-fqdn-network-policy--enable-identity-serviceWhen enabled, users can authenticate to Kubernetes cluster with external identity providers.
Identity Service is by default disabled when creating a new cluster. To disable Identity Service in an existing cluster, explicitly set flag--no-enable-identity-service.
--enable-image-streaming--no-enable-image-streaming.
--enable-insecure-kubelet-readonly-port--no-enable-insecure-kubelet-readonly-port.
--enable-intra-node-visibilityEnabling intra-node visibility makes your intra-node pod-to-pod traffic visible to the networking fabric. With this feature, you can use VPC flow logging or other VPC features for intra-node traffic.
Enabling it on an existing cluster causes the cluster master and the cluster nodes to restart, which might cause a disruption.--enable-kernel-module-signature-enforcement--no-enable-kernel-module-signature-enforcement when creating the
nodepool. Use --no-enable-kernel-module-signature-enforcement to
disable.
Examples:
gcloud container clusters update example-cluster --enable-kernel-module-signature-enforcement--enable-kubernetes-unstable-apis=API,[API,…]--enable-l4-ilb-subsetting--enable-legacy-authorization--no-enable-legacy-authorization.
--enable-legacy-lustre-port--enable-multi-networking--enable-network-policy--enable-private-nodes--enable-private-nodes is not provided at
node pool creation time.
Modifications to this flag do not affect `--enable-private-nodes` state of the existing node pools.
Autopilot cluster: Force new and existing workloads, without explicit
cloud.google.com/private-node=true node selector, to run on nodes
with no public IP address.
Modifications to this flag trigger a re-schedule operation on all existng workloads to run on different node VMs.
--enable-service-externalips--enable-shielded-nodes--enable-stackdriver-kubernetes--enable-stackdriver-kubernetes flag is deprecated and will be
removed in an upcoming release. Please use --logging and
--monitoring instead. For more information, please read: https://cloud.google.com/kubernetes-engine/docs/concepts/about-logs
and https://cloud.google.com/kubernetes-engine/docs/how-to/configure-metrics.
Or at most one of these can be specified:
Flags for vertical pod autoscaling:
--enable-vertical-pod-autoscaling--gateway-api=GATEWAY_APIGATEWAY_API must be one of:
disabledstandardstandard OSS Gateway API release channel will be installed.
--generate-password--hpa-profile=HPA_PROFILE--in-transit-encryption=IN_TRANSIT_ENCRYPTIONIN_TRANSIT_ENCRYPTION must be one
of: inter-node-transparent, none.
--logging-variant=LOGGING_VARIANTMAX_THROUGHPUT,
DEFAULT. If no value is specified, DEFAULT is used.
LOGGING_VARIANT must be one of:
DEFAULTMAX_THROUGHPUT--maintenance-window=START_TIMEgcloud container clusters update example-cluster --maintenance-window=12:43The time corresponds to the UTC time zone, and must be in HH:MM format.
Non-emergency maintenance will occur in the 4 hour block starting at the specified time.
This is mutually exclusive with the recurring maintenance windows and will overwrite any existing window. Compatible with maintenance exclusions.
To remove an existing maintenance window from the cluster, use '--clear-maintenance-window'.--network-performance-configs=[PROPERTY1=VALUE1,…]total-egress-bandwidth-tier--node-creation-mode=NODE_CREATION_MODENODE_CREATION_MODE must be one of:
CONTROL_PLANEKUBELET--node-locations=ZONE,[ZONE,…]-location, --zone, or --region flag.
Additionally, for zonal clusters, --node-locations must contain the
cluster's primary zone. If not specified, all nodes will be in the cluster's
primary zone (for zonal clusters) or spread across three randomly chosen zones
within the cluster's region (for regional clusters).
Note that NUM_NODES nodes will be created in each zone, such that
if you specify --num-nodes=4 and choose two locations, 8 nodes will
be created.
Multiple locations can be specified, separated by commas. For example:
gcloud container clusters update example-cluster --location us-central1-a --node-locations us-central1-a,us-central1-b--notification-config=[pubsub=ENABLED|DISABLED,pubsub-topic=TOPIC,…]Examples:
gcloud container clusters update example-cluster --notification-config=pubsub=ENABLED,pubsub-topic=projects/{project}/topics/{topic-name}gcloud container clusters update example-cluster --notification-config=pubsub=ENABLED,pubsub-topic=projects/{project}/topics/{topic-name},filter="SecurityBulletinEvent|UpgradeEvent"
--patch-update=[PATCH_UPDATE]Setting to 'accelerated' automatically upgrades the cluster to the latest patch available within the cluster's current minor version and release channel. Setting to 'default' automatically upgrades the cluster to the default patch upgrade targetversion available within the cluster's current minor version and release channel.
PATCH_UPDATE must be one of: accelerated,
default.
--private-ipv6-google-access-type=PRIVATE_IPV6_GOOGLE_ACCESS_TYPEPRIVATE_IPV6_GOOGLE_ACCESS_TYPE must be one of:
bidirectional Allows Google services to initiate connections to GKE pods in this cluster. This is not intended for common use, and requires previous integration with Google services.
disabled Default value. Disables private access to Google services over IPv6.
outbound-only Allows GKE pods to make fast, secure requests to Google services over IPv6. This is the most common use of private IPv6 access.
gcloud alpha container clusters create --private-ipv6-google-access-type=disabledgcloud alpha container clusters create --private-ipv6-google-access-type=outbound-onlygcloud alpha container clusters create --private-ipv6-google-access-type=bidirectional
PRIVATE_IPV6_GOOGLE_ACCESS_TYPE must be one of:
bidirectional, disabled, outbound-only.
--release-channel=CHANNELWhen a cluster is subscribed to a release channel, Google maintains both the master version and the node version. Node auto-upgrade is enabled by default for release channel clusters and can be controlled via upgrade-scope exclusions.
CHANNEL must be one of:
Noneextendedrapidregularstable--remove-autopilot-workload-policies=REMOVE_WORKLOAD_POLICIESExamples:
gcloud container clusters update example-cluster --remove-autopilot-workload-policies=allow-net-admin--remove-labels=[KEY,…]Examples:
gcloud container clusters update example-cluster --remove-labels=label_a,label_b--remove-workload-policies=REMOVE_WORKLOAD_POLICIESExamples:
gcloud container clusters update example-cluster --remove-workload-policies=allow-net-admin--security-group=SECURITY_GROUPTo include group membership as part of the claims issued by Google during authentication, a group must be designated as a security group by including it as a direct member of this group.
If unspecified, no groups will be returned for use with RBAC.--security-posture=SECURITY_POSTURE
To enable advanced mode explicitly set the flag to
--security-posture=enterprise.
To enable in standard mode explicitly set the flag to
--security-posture=standard
To disable in an existing cluster, explicitly set the flag to
--security-posture=disabled.
For more information on enablement, see https://cloud.google.com/kubernetes-engine/docs/concepts/about-security-posture-dashboard#feature-enablement.
SECURITY_POSTURE must be one of: disabled,
standard, enterprise.
--set-password--stack-type=STACK_TYPESTACK_TYPE must be
one of: ipv4, ipv4-ipv6.
--start-credential-rotationgcloud container clusters update example-cluster --start-credential-rotation--start-ip-rotationgcloud container clusters update example-cluster --start-ip-rotation--tier=TIER--tier flag is deprecated. More info: https://cloud.google.com/kubernetes-engine/docs/release-notes#September_02_2025.
TIER must be one of: standard,
enterprise.
--update-addons=[ADDON=ENABLED|DISABLED,…]--update-labels=[KEY=VALUE,…]Examples:
gcloud container clusters update example-cluster --update-labels=label_a=value1,label_b=value2--workload-policies=WORKLOAD_POLICIESExamples:
gcloud container clusters update example-cluster --workload-policies=allow-net-admin--workload-pool=WORKLOAD_POOLWhen enabled, Kubernetes service accounts will be able to act as Cloud IAM Service Accounts, through the provided workload pool.
Currently, the only accepted workload pool is the workload pool of the Cloud
project containing the cluster, PROJECT_ID.svc.id.goog.
For more information on Workload Identity, see
https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
--workload-vulnerability-scanning=WORKLOAD_VULNERABILITY_SCANNING
To enable Advanced vulnerability insights mode explicitly set the flag to
--workload-vulnerability-scanning=enterprise.
To enable in standard mode explicitly set the flag to
--workload-vulnerability-scanning=standard.
To disable in an existing cluster, explicitly set the flag to
--workload-vulnerability-scanning=disabled.
For more information on enablement, see https://cloud.google.com/kubernetes-engine/docs/concepts/about-security-posture-dashboard#feature-enablement.
WORKLOAD_VULNERABILITY_SCANNING must be one of:
disabled, standard, enterprise.
Or at least one of these can be specified:
--additional-ip-ranges=[subnetwork=NAME,pod-ipv4-range=NAME,…]Examples:
gcloud container clusters update example-cluster --additional-ip-ranges=subnetwork=my-subnet,pod-ipv4-range=my-range--remove-additional-ip-ranges=[subnetwork=NAME,pod-ipv4-range=NAME,…]Examples:
Remove pod range named "my-range" under additional subnetwork named "my-subnet" from the cluster.
gcloud container clusters update example-cluster --remove-additional-ip-ranges=subnetwork=my-subnet,pod-ipv4-range=my-rangeRemove additional subnetwork named "my-subnet", including all the pod ipv4 ranges under the subnetwork.
gcloud container clusters update example-cluster --remove-additional-ip-ranges=subnetwork=my-subnet--additional-pod-ipv4-ranges=NAME,[NAME,…]Examples:
gcloud container clusters update example-cluster --additional-pod-ipv4-ranges=range1,range2--remove-additional-pod-ipv4-ranges=NAME,[NAME,…]Examples:
gcloud container clusters update example-cluster --remove-additional-pod-ipv4-ranges=range1,range2--auto-monitoring-scope=AUTO_MONITORING_SCOPEAUTO_MONITORING_SCOPE must be one of:
ALL, NONE.
--logging=[COMPONENT,…]SYSTEM, WORKLOAD, API_SERVER,
CONTROLLER_MANAGER, SCHEDULER, KCP_HPA,
NONE
For more information, see https://cloud.google.com/kubernetes-engine/docs/concepts/about-logs#available-logs
Examples:
gcloud container clusters update --logging=SYSTEMgcloud container clusters update --logging=SYSTEM,API_SERVER,WORKLOADgcloud container clusters update --logging=NONE
--monitoring=[COMPONENT,…]SYSTEM, WORKLOAD (Deprecated), NONE,
API_SERVER, CONTROLLER_MANAGER,
SCHEDULER, DAEMONSET, DEPLOYMENT,
HPA, POD, STATEFULSET,
STORAGE, CADVISOR, KUBELET,
DCGM, JOBSET
Note: DAEMONSET, DEPLOYMENT, HPA,
POD, STATEFULSET, STORAGE,
CADVISOR, KUBELET, DCGM, and
JOBSET require Google Managed Prometheus to be enabled.
For more information, see https://cloud.google.com/kubernetes-engine/docs/how-to/configure-metrics#available-metrics
Examples:
gcloud container clusters update --monitoring=SYSTEM,API_SERVER,PODgcloud container clusters update --monitoring=NONE
--disable-managed-prometheus--enable-managed-prometheusSee https://cloud.google.com/stackdriver/docs/managed-prometheus/setup-managed#enable-mgdcoll-gke for more info.
Enabled by default for cluster versions 1.27 or greater, use --no-enable-managed-prometheus to disable. Or at least one of these can be specified: Flags for Binary Authorization: At most one of these can be specified:--binauthz-evaluation-mode=BINAUTHZ_EVALUATION_MODEBINAUTHZ_EVALUATION_MODE must be one of:
disabled, project-singleton-policy-enforce.
--enable-binauthz--enable-binauthz flag is deprecated. Please use
--binauthz-evaluation-mode instead.
Or at least one of these can be specified:
--clear-fleet-project--enable-fleet--fleet-project=FLEET_HOST_PROJECT. Example: $ gcloud
container clusters update --enable-fleet
--fleet-project=PROJECT_ID_OR_NUMBER--membership-type=MEMBERSHIP_TYPEMEMBERSHIP_TYPE must be (only one value is supported):
LIGHTWEIGHT--unset-membership-type--clear-maintenance-minor-version-disruption-interval--maintenance-minor-version-disruption-interval=MAINTENANCE_MINOR_VERSION_DISRUPTION_INTERVAL--clear-maintenance-patch-version-disruption-interval--maintenance-patch-version-disruption-interval=MAINTENANCE_PATCH_VERSION_DISRUPTION_INTERVAL--clear-maintenance-window--remove-maintenance-exclusion=NAME--add-maintenance-exclusion-scope is not specified, the exclusion
will exclude all upgrades.
Examples:
gcloud container clusters update example-cluster --add-maintenance-exclusion-name=holidays-2000 --add-maintenance-exclusion-start=2000-11-20T00:00:00 --add-maintenance-exclusion-end=2000-12-31T23:59:59 --add-maintenance-exclusion-scope=no_upgrades--add-maintenance-exclusion-name=NAME--add-maintenance-exclusion-scope=SCOPE--add-maintenance-exclusion-start=TIME_STAMP--add-maintenance-exclusion-end=TIME_STAMP--add-maintenance-exclusion-until-end-of-supportExamples:
For a 9-5 Mon-Wed UTC-4 maintenance window:
gcloud container clusters update example-cluster --maintenance-window-start=2000-01-01T09:00:00-04:00 --maintenance-window-end=2000-01-01T17:00:00-04:00 --maintenance-window-recurrence='FREQ=WEEKLY;BYDAY=MO,TU,WE'For a daily window from 22:00 - 04:00 UTC:
gcloud container clusters update example-cluster --maintenance-window-start=2000-01-01T22:00:00Z --maintenance-window-end=2000-01-02T04:00:00Z --maintenance-window-recurrence=FREQ=DAILY--maintenance-window-recurrence=RRULE--maintenance-window-start=TIME_STAMP--maintenance-window-duration=PT1H23M45S4H). Use this flag or the
--maintenance-window-end flag for the duration of the maintenance
window.
--maintenance-window-end=TIME_STAMP--clear-resource-usage-bigquery-dataset--enable-network-egress-meteringWhen enabled, a DaemonSet is deployed into the cluster. Each DaemonSet pod meters network egress traffic by collecting data from the conntrack table, and exports the metered metrics to the specified destination.
Network egress metering is disabled if this flag is omitted, or when--no-enable-network-egress-metering is set.
--enable-resource-consumption-meteringWhen enabled, a table will be created in the specified BigQuery dataset to store resource consumption data. The resulting table can be joined with the resource usage table or with BigQuery billing export.
To disable resource consumption metering, set--no-enable-resource-consumption- metering. If this flag is
omitted, then resource consumption metering will remain enabled or disabled
depending on what is already configured for this cluster.
--resource-usage-bigquery-dataset=RESOURCE_USAGE_BIGQUERY_DATASETExamples:
gcloud container clusters update example-cluster --resource-usage-bigquery-dataset=example_bigquery_dataset_name--cluster-dns=CLUSTER_DNSCLUSTER_DNS must
be one of:
clouddnsdefaultkubedns--cluster-dns-domain=CLUSTER_DNS_DOMAINcluster.local.
This is configurable when --cluster-dns=clouddns and
--cluster-dns-scope=vpc are set. The value must be a valid DNS
subdomain as defined in RFC 1123.
--cluster-dns-scope=CLUSTER_DNS_SCOPE--cluster-dns=clouddns. Defaults to cluster.
CLUSTER_DNS_SCOPE must be one of:
clustervpc--additive-vpc-scope-dns-domain=ADDITIVE_VPC_SCOPE_DNS_DOMAIN--disable-additive-vpc-scope--dataplane-v2-observability-mode=DATAPLANE_V2_OBSERVABILITY_MODEDISABLED.
Advanced Datapath Observability allows for a real-time view into pod-to-pod traffic within your cluster.
Examples:
gcloud container clusters update --dataplane-v2-observability-mode=DISABLEDgcloud container clusters update --dataplane-v2-observability-mode=INTERNAL_VPC_LBgcloud container clusters update --dataplane-v2-observability-mode=EXTERNAL_LBFlag --dataplane-v2-observability-mode has been removed.
DATAPLANE_V2_OBSERVABILITY_MODE must be one of:
DISABLEDEXTERNAL_LBINTERNAL_VPC_LB--disable-dataplane-v2-flow-observability--enable-dataplane-v2-flow-observability--disable-dataplane-v2-metrics--enable-dataplane-v2-metrics--disable-auto-ipam--enable-auto-ipam--disable-l4-lb-firewall-reconciliation--enable-l4-lb-firewall-reconciliation--disable-pod-snapshots--enable-pod-snapshots--enable-authorized-networks-on-private-endpoint--enable-dns-access--enable-google-cloud-access--enable-ip-access--enable-k8s-certs-via-dns--enable-k8s-tokens-via-dns--enable-master-global-access--enable-private-endpoint--enable-master-authorized-networks--master-authorized-networks flag) to connect to Kubernetes master
through HTTPS. Besides these blocks, the following have access as well:
1) The private network the cluster connects to if `--enable-private-nodes` is specified. 2) Google Compute Engine Public IPs if `--enable-private-nodes` is not specified.
--no-enable-master-authorized-networks to disable. When
disabled, public internet (0.0.0.0/0) is allowed to connect to Kubernetes master
through HTTPS.
--master-authorized-networks=NETWORK,[NETWORK,…]--enable-master-authorized-networks is also specified.
--enable-autoprovisioning--autoprovisioning-config-file=PATH_TO_FILEResource limits are specified in the field 'resourceLimits'. Each resource limits definition contains three fields: resourceType, maximum and minimum. Resource type can be "cpu", "memory" or an accelerator (e.g. "nvidia-tesla-t4" for NVIDIA T4). Use gcloud compute accelerator-types list to learn about available accelerator types. Maximum is the maximum allowed amount with the unit of the resource. Minimum is the minimum allowed amount with the unit of the resource.
Identity default contains at most one of the below fields: serviceAccount: The Google Cloud Platform Service Account to be used by node VMs in autoprovisioned node pools. If not specified, the project's default service account is used. scopes: A list of scopes to be used by node instances in autoprovisioned node pools. Multiple scopes can be specified, separated by commas. For information on defaults, look at: https://cloud.google.com/sdk/gcloud/reference/container/clusters/create#--scopes
Node Upgrade settings are specified under the field 'upgradeSettings', which has the following fields: maxSurgeUpgrade: Number of extra (surge) nodes to be created on each upgrade of an autoprovisioned node pool. maxUnavailableUpgrade: Number of nodes that can be unavailable at the same time on each upgrade of an autoprovisioned node pool.
Node Management settings are specified under the field 'management', which has the following fields: autoUpgrade: A boolean field that indicates if node autoupgrade is enabled for autoprovisioned node pools. autoRepair: A boolean field that indicates if node autorepair is enabled for autoprovisioned node pools.
minCpuPlatform (deprecated): If specified, new autoprovisioned nodes will be scheduled on host with specified CPU architecture or a newer one. Note: Min CPU platform can only be specified in Beta and Alpha.
Autoprovisioned node image is specified under the 'imageType' field. If not specified the default value will be applied.
Autoprovisioning locations is a set of zones where new node pools can be created by Autoprovisioning. Autoprovisioning locations are specified in the field 'autoprovisioningLocations'. All zones must be in the same region as the cluster's master(s).
Disk type and size are specified under the 'diskType' and 'diskSizeGb' fields, respectively. If specified, new autoprovisioned nodes will be created with custom boot disks configured by these settings.
Shielded instance settings are specified under the 'shieldedInstanceConfig' field, which has the following fields: enableSecureBoot: A boolean field that indicates if secure boot is enabled for autoprovisioned nodes. enableIntegrityMonitoring: A boolean field that indicates if integrity monitoring is enabled for autoprovisioned nodes.
Customer Managed Encryption Keys (CMEK) used by new auto-provisioned node pools can be specified in the 'bootDiskKmsKey' field.
Use a full or relative path to a local file containing the value of autoprovisioning_config_file. Or at least one of these can be specified: Flags to configure autoprovisioned nodes--autoprovisioning-image-type=AUTOPROVISIONING_IMAGE_TYPE--autoprovisioning-locations=ZONE,[ZONE,…]--autoprovisioning-min-cpu-platform=PLATFORM--autoprovisioning-min-cpu-platform flag is deprecated and will
be removed in an upcoming release. More info: https://cloud.google.com/kubernetes-engine/docs/release-notes#March_08_2022
--max-cpu=MAX_CPU--max-memory=MAX_MEMORY--min-cpu=MIN_CPU--min-memory=MIN_MEMORY--autoprovisioning-max-surge-upgrade=AUTOPROVISIONING_MAX_SURGE_UPGRADE--autoprovisioning-max-unavailable-upgrade=AUTOPROVISIONING_MAX_UNAVAILABLE_UPGRADE--autoprovisioning-node-pool-soak-duration=AUTOPROVISIONING_NODE_POOL_SOAK_DURATION--enable-autoprovisioning-blue-green-upgrade to
take effect.
--autoprovisioning-standard-rollout-policy=[batch-node-count=BATCH_NODE_COUNT,batch-percent=BATCH_NODE_PERCENTAGE,batch-soak-duration=BATCH_SOAK_DURATION,…]--enable-autoprovisioning-blue-green-upgrade to take effect.
Batch sizes are specified by one of, batch-node-count or batch-percent. The duration between batches is specified by batch-soak-duration.
Example:--standard-rollout-policy=batch-node-count=3,batch-soak-duration=60s
--standard-rollout-policy=batch-percent=0.05,batch-soak-duration=180s
Flag group to choose the top level upgrade option:
At most one of these can be specified:
--enable-autoprovisioning-blue-green-upgrade--enable-autoprovisioning-surge-upgrade--autoprovisioning-scopes=[SCOPE,…]--autoprovisioning-service-account=AUTOPROVISIONING_SERVICE_ACCOUNT--enable-autoprovisioning-autorepair--enable-autoprovisioning-autoupgrade--max-accelerator=[type=TYPE,count=COUNT,…]typegcloud compute accelerator-types
list to learn about all available accelerator types.
count--min-accelerator=[type=TYPE,count=COUNT,…]typegcloud compute accelerator-types
list to learn about all available accelerator types.
count--enable-insecure-binding-system-authenticatedsystem:authenticated as a subject in
ClusterRoleBindings and RoleBindings. Allowing bindings that reference
system:authenticated is a security risk and is not recommended.
To disallow binding system:authenticated in a cluster, explicitly
set the --no-enable-insecure-binding-system-authenticated flag
instead.
--enable-insecure-binding-system-unauthenticatedsystem:unauthenticated and
system:anonymous as subjects in ClusterRoleBindings and
RoleBindings. Allowing bindings that reference
system:unauthenticated and system:anonymous are a
security risk and is not recommended.
To disallow binding system:authenticated in a cluster, explicitly
set the --no-enable-insecure-binding-system-unauthenticated flag
instead.
Or at least one of these can be specified:
--logging-service=LOGGING_SERVICE--logging-service flag is deprecated and will be removed in an
upcoming release. Please use --logging instead. For more
information, please read: https://cloud.google.com/kubernetes-engine/docs/concepts/about-logs.
--monitoring-service=MONITORING_SERVICE--monitoring-service flag is deprecated and will be removed in
an upcoming release. Please use --monitoring instead. For more
information, please read: https://cloud.google.com/kubernetes-engine/docs/how-to/configure-metrics.
Or at least one of these can be specified:
--[no-]enable-ray-cluster-logging--enable-ray-cluster-logging to enable and
--no-enable-ray-cluster-logging to disable.
--[no-]enable-ray-cluster-monitoring--enable-ray-cluster-monitoring to enable and
--no-enable-ray-cluster-monitoring to disable.
--[no-]enable-secret-manager--enable-secret-manager to enable and
--no-enable-secret-manager to disable.
--[no-]enable-secret-manager-rotation--enable-secret-manager-rotation to enable and
--no-enable-secret-manager-rotation to disable.
--secret-manager-rotation-interval=SECRET_MANAGER_ROTATION_INTERVAL--[no-]enable-secret-sync--enable-secret-sync to
enable and --no-enable-secret-sync to disable.
--[no-]enable-secret-sync-rotation--enable-secret-sync-rotation to enable and
--no-enable-secret-sync-rotation to disable.
--secret-sync-rotation-interval=SECRET_SYNC_ROTATION_INTERVAL--password=PASSWORD--enable-basic-auth--enable-basic-auth is an alias for --username=admin;
--no-enable-basic-auth is an alias for --username="".
Use --password to specify a password; if not, the server will
randomly generate one. For cluster versions before 1.12, if neither
--enable-basic-auth nor --username is specified,
--enable-basic-auth will default to true. After 1.12,
--enable-basic-auth will default to false.
--username=USERNAME, -u USERNAME--password
to specify a password; if not, the server will randomly generate one.
--async--cloud-run-config=[load-balancer-type=EXTERNAL,…]--addons=CloudRun for
create and --update-addons=CloudRun=ENABLED for update.
load-balancer-typeExamples:
gcloud container clusters update example-cluster --cloud-run-config=load-balancer-type=INTERNAL--node-pool=NODE_POOL--location=LOCATION--region=REGION--zone=ZONE, -z ZONE--location-policy=LOCATION_POLICYBALANCED - Is a best effort policy that aims to balance the sizes
of available zones.
ANY - Instructs the cluster autoscaler to prioritize utilization of
unused reservations, and reduces preemption risk for Spot VMs.
LOCATION_POLICY must be one of: BALANCED,
ANY.
--max-nodes=MAX_NODES--min-nodes=MIN_NODES--total-max-nodes=TOTAL_MAX_NODES--total-min-nodes=TOTAL_MIN_NODES--access-token-file,
--account, --billing-project,
--configuration,
--flags-file,
--flatten, --format, --help, --impersonate-service-account,
--log-http,
--project, --quiet, --trace-token, --user-output-enabled,
--verbosity.
Run $ gcloud help for details.
gcloud alpha container clusters updategcloud beta container clusters update
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 2026-06-09 UTC.