A platform engineer is configuring autoscaling for a state-agnostic API service running on a Google Kubernetes Engine (GKE) Standard cluster. During peak traffic hours, existing pods experience high CPU utilization, and incoming pods remain in a Pending state because the current worker nodes lack remaining CPU capacity to schedule them. Which TWO scaling mechanisms must be configured together to automatically handle both pod load and node capacity constraints? (Select TWO)
- Configure a Horizontal Pod Autoscaler (HPA) targeting the deployment to increase the number of pod replicas as CPU utilization rises.Answer
- Enable Cluster Autoscaler on the GKE node pool to automatically add worker nodes when pods cannot be scheduled due to insufficient resources.Answer
- CConfigure Cluster Autoscaler to monitor pod CPU metrics and add pod replicas directly to existing nodes.
- DConfigure a Horizontal Pod Autoscaler (HPA) to provision new Compute Engine VM instances in the node pool when cluster memory is exhausted.
Answer
To address both pod-level CPU load spikes and node-level capacity shortages, you must combine Horizontal Pod Autoscaler (HPA) to scale pod replica counts with Cluster Autoscaler to scale node pool capacity.
Scaling a GKE workload under heavy load requires a two-tiered scaling approach: the Horizontal Pod Autoscaler (HPA) scales out the number of running pod replicas when CPU usage exceeds target thresholds, while Cluster Autoscaler detects when newly created pods cannot fit onto existing nodes (Pending status) and dynamically adds worker nodes to the GKE node pool.
Step-by-Step Solution
Key Concept
GKE Horizontal Pod Autoscaler vs. Cluster Autoscaler operational boundaries
Estimated Time:1m 30s