
Answer-first summary for fast verification
Answer: Configure a Horizontal Pod Autoscaler.
The question describes a scenario where an application is stateless and experiences inconsistent traffic, requiring both consistent user experience and optimized resource usage. Option A, configuring a cron job to scale the deployment on a schedule, is not dynamic and does not respond to real-time traffic changes, making it less optimal. Option B, configuring a Horizontal Pod Autoscaler (HPA), is ideal because it automatically scales the number of pods in a deployment based on observed CPU utilization or other select metrics, ensuring that the application can handle varying loads efficiently. Option C, configuring a Vertical Pod Autoscaler (VPA), adjusts the CPU and memory requests of pods, which is more suited for stateful applications or those with predictable resource requirements, not the described stateless application with inconsistent traffic. Option D, configuring cluster autoscaling on the node pool, ensures that the cluster has enough resources to schedule pods but does not directly address the scaling of the application's pods based on traffic. Therefore, the best answer is B, as it directly addresses the need to scale the application's pods dynamically based on traffic to maintain consistent user experience and optimize resource usage.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have deployed a stateless application in a large Standard Google Kubernetes Engine (GKE) cluster with multiple concurrent pods. The application experiences variable traffic patterns. How can you maintain a consistent user experience while optimizing cluster resource utilization?
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.
No comments yet.