PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #199
PROFESSIONAL-CLOUD-DEVOPS-ENGINEER Question #199: Real Exam Question with Answer & Explanation
The correct answer is C: Modify the Deployment to use the Pod template from the previous version of your application.. To selectively and controllably roll back only the problematic Pods with minimal user disruption, the best approach is to modify the Deployment spec to reference the previous stable Pod template (image, environment, etc.). Kubernetes will then perform a rolling update back to the
Question
You are deploying a new version of your application to a multi-zone Google Kubernetes Engine (GKE) cluster. The deployment is progressing smoothly, but you notice that some Pods in a specific zone are experiencing higher error rates. You need to selectively roll back the update for the Pods experiencing errors with minimal impact to users. What should you do?
Options
- AScale down the Pods in the affected zone. Redeploy the new version of the application.
- BDrain the affected nodes. Redeploy the new version of the application to the remaining nodes.
- CModify the Deployment to use the Pod template from the previous version of your application.
- DUse the kubectl rollout undo command to roll back the entire deployment. Redeploy the new
Explanation
To selectively and controllably roll back only the problematic Pods with minimal user disruption, the best approach is to modify the Deployment spec to reference the previous stable Pod template (image, environment, etc.). Kubernetes will then perform a rolling update back to the previous version, maintaining availability throughout. Option A scales down Pods in the affected zone and redeploies the new (broken) version, which does not fix the problem. Option B drains nodes entirely, causing disruption. Option D (kubectl rollout undo) is a full, less-controlled rollback of the entire deployment and does not allow selective zone-based targeting, though among all options, C represents the most deliberate and targeted approach.
Topics
Community Discussion
No community discussion yet for this question.