Question

Difficulty: MediumManaging Google Kubernetes Engine Resources

A cluster administrator needs to perform a manual control plane and worker node version upgrade on a Google Kubernetes Engine (GKE) Standard cluster named `prod-analytics-cluster` located in region `us-central1`. Automatic node upgrades are disabled for this cluster due to customized maintenance windows. What is the correct sequence of operational steps to upgrade the control plane first, verify stability, and then safely upgrade the node pool?

  1. 1Inspect available GKE control plane versions for the target region using `gcloud container get-server-config --region=us-central1`.
  2. 2Upgrade the cluster control plane to the target version using `gcloud container clusters upgrade prod-analytics-cluster --master-only --cluster-version=TARGET_VERSION`.
  3. 3Verify that the control plane upgrade has completed successfully and the cluster status is `RUNNING`.
  4. 4Upgrade the worker node pool using `gcloud container node-pools upgrade default-pool --cluster=prod-analytics-cluster --cluster-version=TARGET_VERSION`.
  5. 5Validate worker node status and version uniform updates across the cluster using `kubectl get nodes`.

Answer

The correct operational sequence begins by checking available cluster versions with `gcloud container get-server-config`, upgrading the control plane master using `gcloud container clusters upgrade` with the `--master-only` flag, verifying control plane health, upgrading the node pool using `gcloud container node-pools upgrade`, and finally verifying node readiness using `kubectl get nodes`.
The correct order follows GCP best practices for manual GKE cluster maintenance: first query valid versions (`gcloud container get-server-config`), then upgrade the control plane (`gcloud container clusters upgrade --master-only`), confirm control plane health, upgrade worker node pools (`gcloud container node-pools upgrade`), and verify node health with `kubectl get nodes`.

Step-by-Step Solution

1
Query available GKE server versions
Identified valid target Kubernetes versions supported in `us-central1`
Before triggering upgrades, valid target versions must be verified against regional GKE availability.
2
Initiate control plane upgrade
Control plane upgraded using `--master-only`
Kubernetes version compatibility rules mandate that GKE control planes must be upgraded before worker node pools.
3
Verify control plane status
Control plane state confirmed as `RUNNING`
Ensures API server availability and control plane health before starting rolling updates on worker nodes.
4
Upgrade worker node pool
Node pool upgraded to target version using `gcloud container node-pools upgrade`
Node pools are upgraded after the master control plane is stable.
5
Validate cluster node health
All nodes return `Ready` status on the updated version via `kubectl get nodes`
Final validation ensures all workloads transitioned cleanly and all nodes operate correctly on the new release.

Key Concept

GKE Cluster and Node Pool Manual Upgrade Order
Rate this question