Soru

Zorluk: OrtaManaging Google Kubernetes Engine Resources

A cloud operations team manages a stateless web application running on a Google Kubernetes Engine (GKE) Standard cluster. During peak usage, individual pods reach maximum CPU allocation, requiring additional pod replicas to handle incoming requests. Additionally, during sudden traffic spikes, newly created pods remain in a Pending state because the existing worker nodes lack available CPU capacity to schedule them. Which TWO actions should the team implement to establish dynamic autoscaling at both the workload layer and the cluster infrastructure layer? (Select TWO.)

  1. Deploy a Horizontal Pod Autoscaler (HPA) targeting the web application Deployment to dynamically scale pod replicas based on observed CPU utilization.Cevap
  2. Enable Cluster Autoscaler on the GKE node pool to automatically provision additional Compute Engine worker nodes when pods cannot be scheduled due to resource constraints.Cevap
  3. C
    Configure Cluster Autoscaler to monitor container CPU usage and scale the number of pod replicas within the application Deployment.
  4. D
    Migrate the node pool to use Spot VMs to guarantee node availability and eliminate pod scheduling delays during critical traffic events.

Cevap

To resolve resource bottlenecks at both the application workload level and the underlying cluster infrastructure level, deploy a Horizontal Pod Autoscaler (HPA) to dynamically adjust pod replica counts and enable Cluster Autoscaler on the GKE node pool to automatically add worker nodes when pending pods cannot be scheduled.
Managing GKE capacity efficiently requires separating workload scaling from infrastructure scaling. Horizontal Pod Autoscaler (HPA) automatically adjusts the number of running pod replicas based on real-time CPU utilization metrics. When pod creation causes node capacity to be exhausted, Cluster Autoscaler detects the unschedulable (Pending) pods and automatically provisions new worker nodes into the GKE node pool.

Adım Adım Çözüm

1
Identify the workload-level requirement.
Individual pods are reaching CPU capacity limits, indicating the need to scale the number of running pod instances.
Horizontal Pod Autoscaler (HPA) monitors pod-level metrics such as CPU usage and adjusts replica counts accordingly.
2
Identify the infrastructure-level requirement.
New pods remain in a Pending state due to insufficient CPU capacity on existing worker nodes.
Cluster Autoscaler monitors unschedulable pods and automatically scales up the number of GKE worker nodes in the node pool.
3
Combine HPA and Cluster Autoscaler.
HPA creates new pod replicas in response to high CPU load, and Cluster Autoscaler provisions new worker nodes whenever HPA-created pods exceed current node pool capacity.
This complementary two-tier scaling architecture handles both pod demand and node resource availability.

Anahtar Kavram

Two-tier autoscaling in GKE: Pod-level scaling with HPA vs Node-level scaling with Cluster Autoscaler
Tahmini Süre:1m 30s
Bu soruyu puanla