To list GKE clusters in use, we can use the gcloud container clusters list command in either Cloud Shell or your local computer, resulting in the following output:
Figure 6.4 – Output of the gcloud container clusters list command with clusters listed
To drill down into a specific cluster, we can use the following command:
gcloud container clusters describe –zone=ZONE_NAME CLUSTER_NAME
The command’s output is extensive, so you might consider filtering to shorten the output.
In the previous section of the chapter, we deployed GKE in both Standard and Autopilot modes by using both Cloud console and the CLI. In this section, we will move directly onto modifying the cluster part.
Every person can perceive cluster modifications differently. For someone, it can be adding a node pool or modifying cluster settings; for another person, an upgrade is a cluster modification. Both can be correct, and it would be challenging to describe every possible modification of a GKE cluster.
One very important cluster modification is the GKE cluster version upgrade.
Note
By default, automatic upgrades are enabled for both GKE Standard and GKE Autopilot. There is the possibility to upgrade a GKE Standard cluster manually, but this option doesn’t exist for GKE Autopilot.
Let’s upgrade a GKE Standard cluster to a newer version.
Cloud console
To upgrade a GKE cluster in Cloud console, we need to click on the desired cluster. Then, proceed as follows:
- If a cluster upgrade is available, it will be visible in the Cluster basics section of Cloud console.
- Click UPGRADE AVAILABLE and detailed information about possible upgrades will be displayed:
Figure 6.5 – Cluster basics section with available upgrade
- You can choose the static version or a release channel from the available options. The release channel has three options—Stable channel, Regular channel, and Rapid channel. You can choose the desired version depending on which channel you need:
Figure 6.6 – Cluster basics section with available upgrade (continued)
- After selecting the desired version, we need to click SAVE CHANGES, and the control upgrade starts. It might take a few minutes as all management components must be updated:
Figure 6.7 – Release channel version selection
- After the control plane upgrade, you can proceed with the node pool upgrade to have the same version of GKE components.
With the upgrade in Cloud console complete, we move to the upgrade procedure using a CLI.