Google Associate Cloud Engineer Question 213
Select 2Google Cloud PlatformYou manage an application hosted on Google Kubernetes Engine (GKE) that experiences fluctuating loads throughout the day. The application needs to efficiently manage resources while maintaining performance. Which of the following configurations should you implement to automatically adjust resources based on current demand?
- A
Configure a Horizontal Pod Autoscaler (HPA) to adjust the number of pods based on CPU utilization.
- B
Set up a Vertical Pod Autoscaler (VPA) to modify the resource requests and limits of the pods.
- C
Use Cloud Functions to dynamically allocate resources as needed.
- D
Implement a Managed Instance Group with autoscaling based on HTTP load balancing.
- E
Deploy a static number of pods and manually adjust them based on historical data.
Show answer and explanation
Correct answers: A, B
Explanation
To effectively manage fluctuating loads in a GKE environment, using both Horizontal and Vertical Pod Autoscalers provides a comprehensive autoscaling approach. The HPA adjusts the number of pods based on current demand metrics like CPU usage, while the VPA optimizes resource allocation for each pod. This combination ensures efficient resource utilization and consistent application performance under varying loads.
- A. Correct.
Horizontal Pod Autoscaler (HPA) automatically adjusts the number of pods in a deployment based on the observed CPU utilization or other select metrics.
- B. Correct.
Vertical Pod Autoscaler (VPA) automatically adjusts the CPU and memory requests for pods, optimizing resource usage while maintaining application performance.
- C. Incorrect.
Cloud Functions are not used for autoscaling within GKE as they serve as serverless functions for event-driven computing.
- D. Incorrect.
Managed Instance Groups are used for Compute Engine VMs, not GKE pods, and are typically used with HTTP load balancing for VM scaling.
- E. Incorrect.
Manually adjusting pods does not provide automatic scaling based on real-time demand and is not an efficient use of resources.