Question

Difficulty: MediumManaging Google Kubernetes Engine Resources

A cloud engineer needs to update a containerized workload deployed on a Google Kubernetes Engine (GKE) cluster. During the deployment image update, the new container version fails readiness checks, causing the rollout to stall. Arrange the operational steps in the correct chronological sequence to update the deployment, monitor the rollout, diagnose the failure, and revert the deployment to its previous healthy state.

  1. 1Update the deployment image version using `kubectl set image deployment/order-processor processor=gcr.io/prod-proj/order-processor:v2`.
  2. 2Monitor the progress of the deployment update using `kubectl rollout status deployment/order-processor`.
  3. 3Inspect failing pod events and application logs using `kubectl describe pod` and `kubectl logs`.
  4. 4Roll back the deployment to the last functioning revision using `kubectl rollout undo deployment/order-processor`.

Answer

The correct operational sequence is: 1) Update the deployment image using `kubectl set image`, 2) Monitor the deployment update using `kubectl rollout status`, 3) Inspect pod details and logs using `kubectl describe pod` and `kubectl logs`, and 4) Revert the deployment to its previous revision using `kubectl rollout undo`.
The proper GKE workload management lifecycle requires first applying the image change (`kubectl set image`), tracking the deployment status (`kubectl rollout status`), inspecting errors when the rollout stalls (`kubectl describe pod` / `kubectl logs`), and finally executing a rollback (`kubectl rollout undo`) to restore service availability.

Step-by-Step Solution

1
Trigger the workload update.
The GKE cluster updates the deployment spec and begins creating new ReplicaSet pods with the updated container image.
Applying the updated image tag with `kubectl set image` is the initial action required to start a GKE deployment update.
2
Track rollout progress.
The engineer observes that the deployment rollout is stuck awaiting pod readiness.
Executing `kubectl rollout status` provides real-time feedback on whether new pods successfully pass readiness probes.
3
Diagnose pod failure details.
The error root cause (such as a missing configuration parameter or failing readiness probe) is revealed.
Running `kubectl describe pod` inspects lifecycle events while `kubectl logs` retrieves standard output streams from crashing or unready containers.
4
Execute deployment rollback.
GKE terminates unready pods and restores the prior stable ReplicaSet.
Issuing `kubectl rollout undo` safely restores workload availability without needing manual manifest modifications.

Key Concept

Managing GKE Workload Rollouts and Troubleshooting
Rate this question