File: //snap/google-cloud-cli/396/help/man/man1/gcloud_alpha_container_clusters_upgrade.1
.TH "GCLOUD_ALPHA_CONTAINER_CLUSTERS_UPGRADE" 1
.SH "NAME"
.HP
gcloud alpha container clusters upgrade \- upgrade the Kubernetes version of an existing container cluster
.SH "SYNOPSIS"
.HP
\f5gcloud alpha 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] [\fB\-\-security\-profile\fR=\fISECURITY_PROFILE\fR\ \fB\-\-security\-profile\-runtime\-rules\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(ALPHA)\fR 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 alpha container clusters upgrade sample\-cluster \e
\-\-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 alpha 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 alpha 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
.sp
.TP 2m
Flags for Security Profile:
.RS 2m
.TP 2m
\fB\-\-security\-profile\fR=\fISECURITY_PROFILE\fR
Name and version of the security profile to be applied to the cluster. If not
specified, the current security profile settings are preserved. If the current
security profile is not supported in the new cluster version, this option must
be explicitly specified with a supported security profile, otherwise the
operation will fail.
Examples:
.RS 2m
$ gcloud alpha container clusters upgrade example\-cluster \e
\-\-security\-profile=default\-1.0\-gke.1
.RE
.TP 2m
\fB\-\-security\-profile\-runtime\-rules\fR
Apply runtime rules in the specified security profile to the cluster. When
enabled, a security profile controller and webhook are deployed on the cluster
to enforce the runtime rules. If \-\-no\-security\-profile\-runtime\-rules is
specified to disable this feature, only bootstrapping rules are applied, and no
security profile controller or webhook are installed.
.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"
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation\-only early access
allowlist. These variants are also available:
.RS 2m
$ gcloud container clusters upgrade
.RE
.RS 2m
$ gcloud beta container clusters upgrade
.RE