
Answer-first summary for fast verification
Answer: Deploy a Horizontal Pod Autoscaler, and scale based on the CPU toad.
The correct approach is to deploy a Horizontal Pod Autoscaler (HPA) based on CPU load. HPA is the recommended method for stateless services as it scales by adjusting the number of pod replicas, which aligns with stateless architectures. Using CPU metrics requires minimal setup compared to custom metrics, which would need additional configuration (e.g., exporting custom metrics to Google Cloud Monitoring). Vertical Pod Autoscaler (VPA) options (A and B) are less ideal for stateless services, as VPA adjusts resource requests/limits per pod, potentially causing pod restarts and complicating scaling in distributed systems. Thus, option C balances minimal changes and effectiveness for the given scenario.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Your company's product team has a new requirement to autoscale your stateless and distributed service running in a Google Kubernetes Engine (GKE) cluster, based on customer demand. You need a solution that requires minimal changes since this feature must go live in two weeks. What should you do?
A
Deploy a Vertical Pod Autoscaler, and scale based on the CPU load.
B
Deploy a Vertical Pod Autoscaler, and scale based on a custom metric.
C
Deploy a Horizontal Pod Autoscaler, and scale based on the CPU toad.
D
Deploy a Horizontal Pod Autoscaler, and scale based on a custom metric.
No comments yet.