- NAME
-
- gcloud container clusters upgrade - upgrade the Kubernetes version of an existing container cluster
- SYNOPSIS
-
-
gcloud container clusters upgrade
NAME
[--async
] [--cluster-version
=CLUSTER_VERSION
] [--image-type
=IMAGE_TYPE
] [--master
] [--node-pool
=NODE_POOL
] [--location
=LOCATION
|--region
=REGION
|--zone
=ZONE
,-z
ZONE
] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
-
Upgrades the Kubernetes version of an existing container cluster.
This command upgrades the Kubernetes version of the
node pools
ormaster
of a cluster. Note that the Kubernetes version of the cluster'smaster
is also periodically upgraded automatically as new releases are available.If desired cluster version is omitted,
node pool
upgrades default to the currentmaster
version andmaster
upgrades default 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 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.Please ensure that any data you wish to keep is stored on a persistent
disk before upgrading the cluster.
Ephemeral Kubernetes resources--in particular, Pods without replication controllers--will be lost, while persistent Kubernetes resources will get rescheduled. - EXAMPLES
-
Upgrade the node pool
pool-1
ofsample-cluster
to the Kubernetes version of the cluster's master.gcloud container clusters upgrade sample-cluster --node-pool=pool-1
Upgrade the node pool
pool-1
ofsample-cluster
to Kubernetes version 1.14.7-gke.14:gcloud container clusters upgrade sample-cluster --node-pool=pool-1 --cluster-version="1.14.7-gke.14"
Upgrade the master of
sample-cluster
to the default cluster version:gcloud container clusters upgrade sample-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 pool
upgrades default to the currentmaster
version andmaster
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:
gcloud container get-server-config
--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 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.
gcloud container get-server-config
--master
- Upgrade the cluster's master. Node pools cannot be upgraded at the same time as the 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. Prefer using this flag over the --region or --zone flags.
--region
=REGION
- Compute region (e.g. us-central1) for a regional cluster.
--zone
=ZONE
,-z
ZONE
-
Compute zone (e.g. us-central1-a) for a zonal cluster. Overrides the default
compute/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 help
for details. - NOTES
-
These variants are also available:
gcloud alpha container clusters upgrade
gcloud beta container clusters upgrade
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 2024-05-21 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"last_modified": "Last updated 2024-05-21 UTC.",
"state": ""
}