A systems operations team manages an e-commerce platform running on a Google Kubernetes Engine (GKE) Standard cluster. During promotional events, spikes in user traffic cause existing Pods to reach CPU resource limits while newly created Pods remain in a 'Pending' state due to insufficient cluster node capacity. Which TWO actions must be implemented to automatically scale both the Pod workload and the underlying node infrastructure capacity? (Select TWO.)
- Create a Horizontal Pod Autoscaler (HPA) targeting the application Deployment to scale Pod replica counts based on CPU utilization metrics.Answer
- Enable Cluster Autoscaler on the GKE node pool using the gcloud container clusters update command to automatically adjust node counts based on unschedulable Pods.Answer
- CConfigure the Cluster Autoscaler policy to increase the replica count of the application Pods whenever node CPU utilization exceeds 80%.
- DConvert the primary node pool to use Spot VMs without configuring taints, tolerations, or secondary node pools to handle traffic spikes.
Answer
To automatically scale workload Pods and underlying cluster node capacity in GKE, the team must deploy a Horizontal Pod Autoscaler (HPA) to dynamically adjust Pod replica counts and enable Cluster Autoscaler on the GKE node pool to provision additional nodes for unschedulable Pods.
Handling both workload demand spikes and node capacity limits requires a two-tiered autoscaling strategy. Creating a Horizontal Pod Autoscaler (HPA) dynamically increases the number of Pod replicas when CPU usage surges. Concurrently, enabling Cluster Autoscaler on the GKE node pool ensures that when newly created Pods cannot be scheduled due to lack of available CPU/RAM on existing nodes, GKE automatically provisions new node instances.
Step-by-Step Solution
Key Concept
GKE Dual-Layer Autoscaling (Horizontal Pod Autoscaler and Cluster Autoscaler)