Soru

Zorluk: OrtaManaging Google Kubernetes Engine Resources

A DevOps engineer manages a stateless web application deployed on a Google Kubernetes Engine (GKE) cluster. During peak traffic events, incoming traffic triggers additional Pod creation, but several newly created Pods remain stuck in a Pending state with a reason of insufficient CPU resources. The engineer wants the GKE infrastructure to automatically add Compute Engine virtual machine instances to the cluster whenever Pods cannot be scheduled due to resource starvation. Which operational action should the engineer take?

  1. Enable Cluster Autoscaler on the node pool to automatically adjust the number of nodes based on unschedulable Pod demand.Cevap
  2. B
    Configure a Horizontal Pod Autoscaler (HPA) resource targeting CPU utilization to scale node capacity within the cluster.
  3. C
    Deploy a dedicated node pool configured with Spot VMs to guarantee compute resource availability during sudden traffic spikes.
  4. D
    Migrate the application workload to a GKE Autopilot cluster configured with custom node kernel modules to bypass node resource limits.

Cevap

Enable Cluster Autoscaler on the node pool to automatically adjust the number of nodes based on unschedulable Pod demand.
Cluster Autoscaler continuously checks for Pods that are unschedulable due to resource limitations. Upon detecting pending Pods, it resizes the node pool by adding Compute Engine instances so that the Pods can be scheduled successfully.

Adım Adım Çözüm

1
Analyze the cause of the Pending Pod status
Pods are unschedulable because existing cluster nodes do not have enough remaining allocatable CPU.
When requested CPU resources exceed cluster capacity, the Kubernetes scheduler leaves Pods in a Pending state.
2
Differentiate between workload scaling and infrastructure scaling
Cluster Autoscaler manages the node pool size (infrastructure), whereas Horizontal Pod Autoscaler manages Pod replica counts (workload).
To resolve node capacity limits for unschedulable Pods, infrastructure-level autoscaling via Cluster Autoscaler is required.

Anahtar Kavram

GKE Cluster Autoscaler vs Horizontal Pod Autoscaler
Bu soruyu puanla