File: //snap/google-cloud-cli/current/help/man/man1/gcloud_container_clusters_resize.1
.TH "GCLOUD_CONTAINER_CLUSTERS_RESIZE" 1
.SH "NAME"
.HP
gcloud container clusters resize \- resizes an existing cluster for running containers
.SH "SYNOPSIS"
.HP
\f5gcloud container clusters resize\fR \fINAME\fR (\fB\-\-num\-nodes\fR=\fINUM_NODES\fR\ |\ \fB\-\-size\fR=\fINUM_NODES\fR) [\fB\-\-async\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"
Resize an existing cluster to a provided size.
If you have multiple node pools, you must specify which node pool to resize by
using the \-\-node\-pool flag. You are not required to use the flag if you have
a single node pool.
When increasing the size of a container cluster, the new instances are created
with the same configuration as the existing instances. Existing pods are not
moved onto the new instances, but new pods (such as those created by resizing a
replication controller) will be scheduled onto the new instances.
When decreasing a cluster, the nodes are drained. As a result, the pods running
on these nodes are gracefully terminated. If your pods are being managed by a
workload controller, the controller will attempt to reschedule them onto the
remaining instances. If your pods are not managed by a workload controller, they
will not be restarted. Note that when resizing down, instances running pods and
instances without pods are not differentiated. Resize will pick instances to
remove at random.
When you resize a node pool that spans multiple zones, the new size represents
the number of nodes in the node pool per zone. For example, if you have a node
pool of size 2 spanning two zones, the total node count is 4. If you resize the
node pool with \f5\-\-num\-nodes=4\fR, the total node count becomes 8.
.SH "EXAMPLES"
To resize the default node pool of an existing cluster, run:
.RS 2m
$ gcloud container clusters resize sample\-cluster \-\-num\-nodes=2
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fINAME\fR
The name of this cluster.
.RE
.sp
.SH "REQUIRED FLAGS"
.RS 2m
.TP 2m
Exactly one of these must be specified:
.RS 2m
.TP 2m
\fB\-\-num\-nodes\fR=\fINUM_NODES\fR
Target number of nodes in the cluster.
.TP 2m
\fB\-\-size\fR=\fINUM_NODES\fR
(DEPRECATED) Target number of nodes in the cluster.
The \-\-size flag is now deprecated. Please use \f5\-\-num\-nodes\fR instead.
.RE
.RE
.sp
.SH "OPTIONAL FLAGS"
.RS 2m
.TP 2m
\fB\-\-async\fR
Return immediately, without waiting for the operation in progress to complete.
.TP 2m
\fB\-\-node\-pool\fR=\fINODE_POOL\fR
The node pool to resize.
.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 resize
.RE
.RS 2m
$ gcloud beta container clusters resize
.RE