File: //snap/google-cloud-cli/396/help/man/man1/gcloud_container_clusters_upgrade.1
.TH "GCLOUD_CONTAINER_CLUSTERS_UPGRADE" 1
.SH "NAME"
.HP
gcloud container clusters upgrade \- upgrade the Kubernetes version of an existing container cluster
.SH "SYNOPSIS"
.HP
\f5gcloud container clusters upgrade\fR \fINAME\fR [\fB\-\-async\fR] [\fB\-\-cluster\-version\fR=\fICLUSTER_VERSION\fR] [\fB\-\-image\-type\fR=\fIIMAGE_TYPE\fR] [\fB\-\-master\fR] [\fB\-\-node\-pool\fR=\fINODE_POOL\fR] [\fB\-\-location\fR=\fILOCATION\fR\ |\ \fB\-\-region\fR=\fIREGION\fR\ |\ \fB\-\-zone\fR=\fIZONE\fR,\ \fB\-z\fR\ \fIZONE\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
Upgrades the Kubernetes version of an existing container cluster.
This command upgrades the Kubernetes version of the \fBnode pools\fR or
\fBmaster\fR of a cluster. Note that the Kubernetes version of the cluster's
\fBmaster\fR is also periodically upgraded automatically as new releases are
available.
If desired cluster version is omitted, \fBnode pool\fR upgrades default to the
current \fBmaster\fR version and \fBmaster\fR upgrades default to the default
cluster version, which can be found in the server config.
\fBDuring node pool upgrades, nodes will be deleted and recreated.\fR While
persistent Kubernetes resources, such as Pods backed by replication controllers,
will be rescheduled onto new nodes, a small cluster may experience a few minutes
where there are insufficient nodes available to run all of the scheduled
Kubernetes resources.
\fBPlease ensure that any data you wish to keep is stored on a persistent\fR
\fBdisk before upgrading the cluster.\fR Ephemeral Kubernetes resources\-\-in
particular, Pods without replication controllers\-\-will be lost, while
persistent Kubernetes resources will get rescheduled.
.SH "EXAMPLES"
Upgrade the node pool \f5pool\-1\fR of \f5sample\-cluster\fR to the Kubernetes
version of the cluster's master.
.RS 2m
$ gcloud container clusters upgrade sample\-cluster \-\-node\-pool=pool\-1
.RE
Upgrade the node pool \f5pool\-1\fR of \f5sample\-cluster\fR to Kubernetes
version 1.14.7\-gke.14:
.RS 2m
$ gcloud container clusters upgrade sample\-cluster \e
\-\-node\-pool=pool\-1 \-\-cluster\-version="1.14.7\-gke.14"
.RE
Upgrade the master of \f5sample\-cluster\fR to the default cluster version:
.RS 2m
$ gcloud container clusters upgrade sample\-cluster \-\-master
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fINAME\fR
The name of the cluster to upgrade.
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-async\fR
Return immediately, without waiting for the operation in progress to complete.
.TP 2m
\fB\-\-cluster\-version\fR=\fICLUSTER_VERSION\fR
The GKE release version to which to upgrade the cluster's node pools or master.
If desired cluster version is omitted, \fBnode pool\fR upgrades default to the
current \fBmaster\fR version and \fBmaster\fR upgrades default 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:
.RS 2m
$ gcloud container get\-server\-config
.RE
.TP 2m
\fB\-\-image\-type\fR=\fIIMAGE_TYPE\fR
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 will
run on. If an image type is specified, that will be assigned to the cluster/node
pool and all future upgrades will use the specified image type. If it is not
specified the server will pick the default image type.
The default image type and the list of valid image types are available using the
following command.
.RS 2m
$ gcloud container get\-server\-config
.RE
.TP 2m
\fB\-\-master\fR
Upgrade the cluster's master. Node pools cannot be upgraded at the same time as
the master.
.TP 2m
\fB\-\-node\-pool\fR=\fINODE_POOL\fR
The node pool to upgrade.
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-location\fR=\fILOCATION\fR
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 command
invocation. Prefer using this flag over the \-\-region or \-\-zone flags.
.TP 2m
\fB\-\-region\fR=\fIREGION\fR
Compute region (e.g. us\-central1) for a regional cluster. Overrides the default
compute/region property value for this command invocation.
.TP 2m
\fB\-\-zone\fR=\fIZONE\fR, \fB\-z\fR \fIZONE\fR
Compute zone (e.g. us\-central1\-a) for a zonal cluster. Overrides the default
compute/zone property value for this command invocation.
.RE
.RE
.sp
.SH "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 \fB$ gcloud help\fR for details.
.SH "NOTES"
These variants are also available:
.RS 2m
$ gcloud alpha container clusters upgrade
.RE
.RS 2m
$ gcloud beta container clusters upgrade
.RE