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?
- 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
- BDeploy a Horizontal Pod Autoscaler (HPA) targeting the batch processing workload to increase the node count whenever cluster CPU utilization exceeds 80%.
- CConvert the existing GKE Standard cluster in-place to GKE Autopilot mode by executing gcloud container clusters update with the --enable-autopilot flag.
- DModify 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
Anahtar Kavram
GKE Cluster Autoscaler vs HPA & Spot VM Node Pools
Tahmini Süre:2m 0s