PROFESSIONAL-CLOUD-DEVELOPER · Question #241
You plan to deploy a new application revision with a Deployment resource to Google Kubernetes Engine (GKE) in production. The container might not work correctly. You want to minimize risk in case…
The correct answer is A. Perform a rolling update with a PodDisruptionBudget of 80%. A rolling update with a PodDisruptionBudget (PDB) of 80% is the Google-recommended approach to minimize risk during a potentially problematic deployment. The rolling update strategy gradually replaces old pods with new ones rather than replacing all at once, so if the new…
Question
You plan to deploy a new application revision with a Deployment resource to Google Kubernetes Engine (GKE) in production. The container might not work correctly. You want to minimize risk in case there are issues after deploying the revision. You want to follow Google-recommended best practices. What should you do?
Options
- APerform a rolling update with a PodDisruptionBudget of 80%.
- BPerform a rolling update with a HorizontalPodAutoscaler scale-down policy value of 0.
- CConvert the Deployment to a StatefulSet, and perform a rolling update with a
- DConvert the Deployment to a StatefulSet, and perform a rolling update with a
How the community answered
(36 responses)- A81% (29)
- B11% (4)
- C6% (2)
- D3% (1)
Explanation
A rolling update with a PodDisruptionBudget (PDB) of 80% is the Google-recommended approach to minimize risk during a potentially problematic deployment. The rolling update strategy gradually replaces old pods with new ones rather than replacing all at once, so if the new container has issues, the impact is limited and rollback is straightforward. A PodDisruptionBudget of 80% ensures that at least 80% of pods remain available at all times during the update, maintaining service availability. Options C and D suggest converting a Deployment to a StatefulSet, which is inappropriate because StatefulSets are for stateful applications with stable identities (like databases), not typical web applications. Deployment is the correct resource for stateless workloads and supports rolling updates natively.
Topics
Community Discussion
No community discussion yet for this question.