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.
- 1Update the deployment image version using `kubectl set image deployment/order-processor processor=gcr.io/prod-proj/order-processor:v2`.
- 2Monitor the progress of the deployment update using `kubectl rollout status deployment/order-processor`.
- 3Inspect failing pod events and application logs using `kubectl describe pod` and `kubectl logs`.
- 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
Key Concept
Managing GKE Workload Rollouts and Troubleshooting