Google Cloud Professional Cloud DevOps Engineer — Question 150
You deployed an application into a large Standard Google Kubernetes Engine (GKE) cluster. The application is stateless and multiple pods run at the same time. Your application receives inconsistent traffic. You need to ensure that the user experience remains consistent regardless of changes in traffic and that the resource usage of the cluster is optimized.
What should you do?
Answer options
- A. Configure a cron job to scale the deployment on a schedule
- B. Configure a Horizontal Pod Autoscaler.
- C. Configure a Vertical Pod Autoscaler
- D. Configure cluster autoscaling on the node pool.
Correct answer: B
Explanation
The correct answer is B, as a Horizontal Pod Autoscaler automatically adjusts the number of pods in response to traffic changes, ensuring consistent user experience and optimized resource use. Option A is not effective for dynamic traffic since it relies on a fixed schedule. Option C adjusts resources for individual pods but does not scale the number of pods. Option D manages node resources rather than scaling the application pods themselves.