Soru

Zorluk: OrtaManaging Google Kubernetes Engine Resources

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?

  1. Enable Cluster Autoscaler on the GKE node pool to automatically adjust the number of worker nodes based on pending pod resource demands.Cevap
  2. B
    Configure the Horizontal Pod Autoscaler (HPA) to scale the number of GKE worker nodes whenever average node CPU utilization exceeds 80%80\%.
  3. C
    Recreate the node pool using Spot VMs so that Google Cloud automatically adds capacity whenever pod resource requests exceed node capacity.
  4. D
    Migrate 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

1
Identify the operational bottleneck in the GKE cluster.
Pods are scaling out via HPA but remain in a Pending status because node compute capacity is exhausted.
HPA operates at the Kubernetes workload layer (increasing pod count), while node provisioning operates at the infrastructure layer.
2
Determine the appropriate GKE scaling component required for infrastructure node adjustment.
Cluster Autoscaler must be enabled for the node pool.
Cluster Autoscaler explicitly monitors unschedulable (Pending) pods and provisions additional GKE worker nodes up to the configured maximum size.

Anahtar Kavram

GKE Cluster Autoscaler vs Horizontal Pod Autoscaler (HPA)
Bu soruyu puanla