Soru

Zorluk: ZorManaging Google Kubernetes Engine Resources

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.)

  1. Create a Horizontal Pod Autoscaler (HPA) targeting the application Deployment to scale Pod replica counts based on CPU utilization metrics.Cevap
  2. Enable Cluster Autoscaler on the GKE node pool using the gcloud container clusters update command to automatically adjust node counts based on unschedulable Pods.Cevap
  3. C
    Configure the Cluster Autoscaler policy to increase the replica count of the application Pods whenever node CPU utilization exceeds 80%.
  4. D
    Convert the primary node pool to use Spot VMs without configuring taints, tolerations, or secondary node pools to handle traffic spikes.

Cevap

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.

Adım Adım Çözüm

1
Identify workload-level scaling requirements
Recognize that high CPU utilization within existing Pods requires scaling the number of Pod replicas using Horizontal Pod Autoscaler (HPA).
HPA monitors resource metrics such as CPU usage and adjusts Deployment replica counts accordingly.
2
Identify infrastructure-level capacity constraints
Recognize that Pods remaining in a 'Pending' state indicate insufficient node capacity, which requires Cluster Autoscaler.
Cluster Autoscaler inspects the cluster for Pods in a Pending state due to resource requests and adds Compute Engine VMs to the node pool.
3
Combine dual-layer scaling mechanisms
HPA scales out Pod replicas when traffic spikes, and Cluster Autoscaler provisions new node VMs to host those additional Pod replicas.
Proper GKE resource management requires aligning workload scaling (HPA) with infrastructure scaling (Cluster Autoscaler).

Anahtar Kavram

GKE Dual-Layer Autoscaling (Horizontal Pod Autoscaler and Cluster Autoscaler)
Bu soruyu puanla