An organization runs a web application on a Google Kubernetes Engine (GKE) Standard cluster. During a high-traffic event, existing pods reach high CPU utilization and incoming pod replicas fail to schedule, remaining in a Pending state because the cluster node pool has reached its compute capacity. You need to ensure the cluster automatically provisions additional Compute Engine worker nodes whenever pods are unschedulable due to resource limitations. Which action should you take?
- Enable Cluster Autoscaler on the GKE cluster node pool using gcloud container clusters update with the --enable-autoscaling flag.Cevap
- BExecute kubectl autoscale deployment to automatically provision additional Compute Engine nodes when CPU utilization increases.
- CReconfigure the node pool to use Spot VMs to automatically provision additional nodes whenever pods enter a Pending state.
- DRun gcloud container clusters update with the --enable-autopilot flag to convert the existing Standard cluster into an Autopilot cluster.
Cevap
Enable Cluster Autoscaler on the GKE cluster node pool using gcloud container clusters update with the --enable-autoscaling flag.
The Cluster Autoscaler automatically adds nodes to a GKE node pool when pods cannot be scheduled due to insufficient CPU or memory resources on existing nodes. Enabling autoscaling using gcloud container clusters update with --enable-autoscaling configures GKE to dynamically provision Compute Engine instances as demand increases.
Adım Adım Çözüm
Anahtar Kavram
GKE Cluster Autoscaler vs. Horizontal Pod Autoscaler (HPA)