Soru

Zorluk: ZorManaging Google Kubernetes Engine Resources

A Cloud Engineer manages a Google Kubernetes Engine (GKE) Standard cluster that hosts a stateless, fault-tolerant batch processing pipeline. During peak activity, multiple batch processing Pods remain in a Pending state due to insufficient CPU and memory resources on existing nodes. Management requires an automated scaling solution that provisions additional cluster capacity specifically when Pods cannot be scheduled, while minimizing compute infrastructure costs for this resilient workload. Which action should the engineer take?

  1. Add a dedicated node pool configured with Spot VMs using gcloud container node-pools create with the --spot flag, and enable cluster autoscaling using the --enable-autoscaling flag.Cevap
  2. B
    Deploy a Horizontal Pod Autoscaler (HPA) targeting the batch processing workload to increase the node count whenever cluster CPU utilization exceeds 80%.
  3. C
    Convert the existing GKE Standard cluster in-place to GKE Autopilot mode by executing gcloud container clusters update with the --enable-autopilot flag.
  4. D
    Modify the primary node pool to use standard On-Demand VM instances and configure preemptible node pool scaling using kubectl autoscale deployment.

Cevap

Create a new node pool configured with Spot VMs using gcloud container node-pools create with the --spot flag, and enable GKE Cluster Autoscaler using the --enable-autoscaling flag.
Creating a dedicated node pool using Spot VMs (--spot) provides maximum cost reduction for stateless and fault-tolerant batch workloads. Enabling GKE Cluster Autoscaler (--enable-autoscaling) ensures that when batch Pods remain in a Pending state due to resource shortages, GKE automatically provisions new Spot nodes to accommodate them.

Adım Adım Çözüm

1
Identify the workload resource requirements and cost optimization potential.
Stateless, fault-tolerant batch processing Pods can handle unexpected terminations, making them ideal candidates for discounted GKE Spot VMs.
Spot VMs offer up to 60-91% discounts compared to standard On-Demand Compute Engine pricing.
2
Determine the appropriate Kubernetes/GKE scaling mechanism for unschedulable (Pending) Pods.
GKE Cluster Autoscaler automatically inspects Pods in Pending state due to resource constraints and provisions additional node capacity in designated node pools.
Horizontal Pod Autoscaler (HPA) scales Pod replicas, whereas Cluster Autoscaler scales the underlying Compute Engine node infrastructure.
3
Execute the appropriate gcloud command to create an autoscaling Spot VM node pool.
Run gcloud container node-pools create [POOL_NAME] --cluster=[CLUSTER_NAME] --spot --enable-autoscaling --min-nodes=[MIN] --max-nodes=[MAX].
This command provisions a new Spot VM node pool and enables Cluster Autoscaler to automatically adjust node counts based on unschedulable workload demand.

Anahtar Kavram

GKE Cluster Autoscaler vs HPA & Spot VM Node Pools
Tahmini Süre:2m 0s
Bu soruyu puanla