An infrastructure engineer is managing an existing Google Kubernetes Engine (GKE) Standard cluster hosting a multi-tier web application. During high-traffic events, the Horizontal Pod Autoscaler (HPA) successfully increases the target replica count for the deployment. However, several newly created pods remain stuck in a `Pending` state because the current nodes lack sufficient CPU and memory capacity to accommodate the pod resource requests. The engineer needs to ensure that the infrastructure automatically provisions additional node capacity when pods cannot be scheduled due to resource constraints, and scales down nodes when they are underutilized. Which action should the engineer take?
- Enable Cluster Autoscaler on the GKE node pool to automatically adjust the number of worker nodes based on pending pod resource demands.Cevap
- BConfigure the Horizontal Pod Autoscaler (HPA) to scale the number of GKE worker nodes whenever average node CPU utilization exceeds .
- CRecreate the node pool using Spot VMs so that Google Cloud automatically adds capacity whenever pod resource requests exceed node capacity.
- DMigrate the entire GKE cluster to GKE Autopilot mode because GKE Standard does not support dynamic adjustment of worker node counts.
Cevap
Enable Cluster Autoscaler on the GKE node pool so that GKE automatically adds nodes when pods are in a Pending state due to insufficient resource limits.
Enabling Cluster Autoscaler on the node pool allows GKE to inspect the Kubernetes scheduler for unschedulable pods caused by insufficient CPU or memory resources. When pending pods are detected, Cluster Autoscaler provisions additional Compute Engine worker nodes, allowing the pending pods to be scheduled successfully.
Adım Adım Çözüm
Anahtar Kavram
GKE Cluster Autoscaler vs Horizontal Pod Autoscaler (HPA)