A cloud operations team manages a stateless web application running on a Google Kubernetes Engine (GKE) Standard cluster. During peak usage, individual pods reach maximum CPU allocation, requiring additional pod replicas to handle incoming requests. Additionally, during sudden traffic spikes, newly created pods remain in a Pending state because the existing worker nodes lack available CPU capacity to schedule them. Which TWO actions should the team implement to establish dynamic autoscaling at both the workload layer and the cluster infrastructure layer? (Select TWO.)
- Deploy a Horizontal Pod Autoscaler (HPA) targeting the web application Deployment to dynamically scale pod replicas based on observed CPU utilization.Answer
- Enable Cluster Autoscaler on the GKE node pool to automatically provision additional Compute Engine worker nodes when pods cannot be scheduled due to resource constraints.Answer
- CConfigure Cluster Autoscaler to monitor container CPU usage and scale the number of pod replicas within the application Deployment.
- DMigrate the node pool to use Spot VMs to guarantee node availability and eliminate pod scheduling delays during critical traffic events.
Answer
To resolve resource bottlenecks at both the application workload level and the underlying cluster infrastructure level, deploy a Horizontal Pod Autoscaler (HPA) to dynamically adjust pod replica counts and enable Cluster Autoscaler on the GKE node pool to automatically add worker nodes when pending pods cannot be scheduled.
Managing GKE capacity efficiently requires separating workload scaling from infrastructure scaling. Horizontal Pod Autoscaler (HPA) automatically adjusts the number of running pod replicas based on real-time CPU utilization metrics. When pod creation causes node capacity to be exhausted, Cluster Autoscaler detects the unschedulable (Pending) pods and automatically provisions new worker nodes into the GKE node pool.
Step-by-Step Solution
Key Concept
Two-tier autoscaling in GKE: Pod-level scaling with HPA vs Node-level scaling with Cluster Autoscaler
Estimated Time:1m 30s