gcloud beta container clusters upgrade Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud beta container clusters upgrade - upgrade the Kubernetes version of an existing container cluster
- SYNOPSIS
gcloud beta container clusters upgradeNAME[--async][--cluster-version=CLUSTER_VERSION][--control-plane-soak-duration=CONTROL_PLANE_SOAK_DURATION][--image-type=IMAGE_TYPE][--master][--node-pool=NODE_POOL][--location=LOCATION|--region=REGION|--zone=ZONE,-zZONE][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(BETA)Upgrades the Kubernetes version of an existing containercluster.This command upgrades the Kubernetes version of the
node poolsormasterof a cluster. Note that the Kubernetes version of thecluster'smasteris also periodically upgraded automatically as newreleases are available.If desired cluster version is omitted,
node poolupgrades defaultto the currentmasterversion andmasterupgradesdefault to the default cluster version, which can be found in the server config.During node pool upgrades, nodes will be deleted and recreated.While persistent Kubernetes resources, such as Pods backed by replicationcontrollers, will be rescheduled onto new nodes, a small cluster may experiencea few minutes where there are insufficient nodes available to run all of thescheduled Kubernetes resources.Please ensure that any data you wish to keep is stored on apersistentdisk before upgrading the cluster.EphemeralKubernetes resources--in particular, Pods without replication controllers--willbe lost, while persistent Kubernetes resources will get rescheduled.- EXAMPLES
- Upgrade the node pool
pool-1ofsample-clusterto theKubernetes version of the cluster's master.gcloudbetacontainerclustersupgradesample-cluster--node-pool=pool-1Upgrade the node pool
pool-1ofsample-clustertoKubernetes version 1.14.7-gke.14:gcloudbetacontainerclustersupgradesample-cluster--node-pool=pool-1--cluster-version="1.14.7-gke.14"Upgrade the master of
sample-clusterto the default clusterversion:gcloudbetacontainerclustersupgradesample-cluster--master - POSITIONAL ARGUMENTS
NAME- The name of the cluster to upgrade.
- FLAGS
--async- Return immediately, without waiting for the operation in progress to complete.
--cluster-version=CLUSTER_VERSION- The GKE release version to which to upgrade the cluster's node pools or master.
If desired cluster version is omitted,
node poolupgrades defaultto the currentmasterversion andmasterupgradesdefault to the default cluster version, which can be found in the server config.You can find the list of allowed versions for upgrades by running:
gcloudcontainerget-server-config --control-plane-soak-duration=CONTROL_PLANE_SOAK_DURATION- The soak duration for the rollback-able control plane upgrade. It only appliesto minor version upgrades. Setting this flag will trigger a control planeupgrade with emulated version. The cluster is rollback-able during the soakperiod. The soak period can be set between 6 hours and 7 days.
--image-type=IMAGE_TYPE- The image type to use for the cluster/node pool. Defaults to server-specified.
Image Type specifies the base OS that the nodes in the cluster/node pool willrun on. If an image type is specified, that will be assigned to the cluster/nodepool and all future upgrades will use the specified image type. If it is notspecified the server will pick the default image type.
The default image type and the list of valid image types are available using thefollowing command.
gcloudcontainerget-server-config --master- Upgrade the cluster's master. Node pools cannot be upgraded at the same time asthe master.
--node-pool=NODE_POOL- The node pool to upgrade.
- At most one of these can be specified:
--location=LOCATION- Compute zone or region (e.g. us-central1-a or us-central1) for the cluster.Overrides the default compute/region or compute/zone value for this commandinvocation. Prefer using this flag over the --region or --zone flags.
--region=REGION- Compute region (e.g. us-central1) for a regional cluster. Overrides the defaultcompute/region property value for this command invocation.
--zone=ZONE,-zZONE- Compute zone (e.g. us-central1-a) for a zonal cluster. Overrides the defaultcompute/zone property value for this command invocation.
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--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 helpfor details. - NOTES
- This command is currently in beta and might change without notice. Thesevariants are also available:
gcloudcontainerclustersupgradegcloudalphacontainerclustersupgrade
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-09 UTC.