Question

Difficulty: MediumDeploying and Managing Google Kubernetes Engine (GKE) Clusters and Workloads

Arrange the following administrative procedures in the correct chronological order required to authenticate to a Google Kubernetes Engine (GKE) cluster, confirm active cluster access, submit a new workload manifest, and verify that the pod deployment finishes successfully.

  1. 1Run `gcloud container clusters get-credentials` specifying the target cluster name and region.
  2. 2Run `kubectl get nodes` to verify API server communication and cluster health.
  3. 3Run `kubectl apply -f deployment.yaml` to declare the desired state of the workload.
  4. 4Run `kubectl rollout status deployment/web-app` to monitor container provisioning.

Answer

The correct administrative sequence is: 1. Obtain cluster credentials (`gcloud container clusters get-credentials`), 2. Verify cluster node connectivity (`kubectl get nodes`), 3. Apply the workload manifest (`kubectl apply -f deployment.yaml`), 4. Confirm successful deployment rollout (`kubectl rollout status deployment/web-app`).
The deployment process follows a standard sequence: First, execute `gcloud container clusters get-credentials` to acquire cluster access credentials and set up `kubeconfig`. Second, run `kubectl get nodes` to confirm functional API server access and cluster health. Third, run `kubectl apply -f deployment.yaml` to instruct GKE to create or update the workload resources. Fourth, run `kubectl rollout status deployment/web-app` to observe and verify that all new pods pass readiness probes.

Step-by-Step Solution

1
Generate cluster credentials and update local kubeconfig
The local CLI environment obtains authentication tokens and configures the GKE cluster context.
Commands issued via kubectl will fail unless valid control plane credentials and server endpoints exist in kubeconfig.
2
Test control plane connectivity and node readiness
Returns the list of cluster nodes and their Current status (Ready).
Verifying API server access prevents submitting deployment manifests into an unreachable or broken cluster context.
3
Deploy the application configuration file to the cluster
The Kubernetes API server accepts the deployment specification and triggers pod creation.
Declarative resource creation requires applying the YAML specification file.
4
Observe the progress of the deployment rollout
Monitors pod status until all replicas complete initialization without crash loops or image pull failures.
Executing rollout status provides deterministic verification that the workload update succeeded.

Key Concept

GKE Cluster Authentication and Workload Deployment Lifecycle
Rate this question