Soru

Zorluk: OrtaManaging Google Kubernetes Engine Resources

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)

  1. Configure a Horizontal Pod Autoscaler (HPA) targeting the deployment to increase the number of pod replicas as CPU utilization rises.Cevap
  2. Enable Cluster Autoscaler on the GKE node pool to automatically add worker nodes when pods cannot be scheduled due to insufficient resources.Cevap
  3. C
    Configure Cluster Autoscaler to monitor pod CPU metrics and add pod replicas directly to existing nodes.
  4. D
    Configure a Horizontal Pod Autoscaler (HPA) to provision new Compute Engine VM instances in the node pool when cluster memory is exhausted.

Cevap

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.

Adım Adım Çözüm

1
Identify the mechanism for scaling pod replicas based on workload metrics.
Horizontal Pod Autoscaler (HPA) automatically scales the number of pods in a deployment based on observed metrics like CPU or memory utilization.
HPA ensures that individual pod instances are added when application traffic causes CPU utilization to spike.
2
Identify the mechanism for expanding node capacity when pods cannot be scheduled.
Cluster Autoscaler detects pods stuck in a Pending state due to insufficient cluster resources and adds Compute Engine VMs to the node pool.
Adding pod replicas via HPA will fail to run if the nodes are out of allocatable CPU; Cluster Autoscaler resolves this node capacity bottleneck.

Anahtar Kavram

GKE Horizontal Pod Autoscaler vs. Cluster Autoscaler operational boundaries
Tahmini Süre:1m 30s
Bu soruyu puanla