A DevOps engineer manages a Google Kubernetes Engine (GKE) Standard cluster named `prod-cluster` located in the `us-central1` region. The application workload experiences dynamic spikes in traffic, causing newly scheduled pods to remain in a `Pending` state whenever existing node capacity is exhausted. The engineer needs to update the existing node pool named `worker-pool` so that GKE automatically provisions or removes worker nodes as capacity demands shift, maintaining between 2 and 10 nodes per zone. Which command should the engineer execute?
- gcloud container node-pools update worker-pool --cluster=prod-cluster --region=us-central1 --enable-autoscaling --min-nodes=2 --max-nodes=10Cevap
- Bkubectl autoscale deployment worker-pool --min=2 --max=10 --cpu-percent=80
- Cgcloud container clusters update prod-cluster --region=us-central1 --enable-autopilot
- Dgcloud container node-pools update worker-pool --cluster=prod-cluster --region=us-central1 --enable-spot
Cevap
The command `gcloud container node-pools update worker-pool --cluster=prod-cluster --region=us-central1 --enable-autoscaling --min-nodes=2 --max-nodes=10` enables GKE Cluster Autoscaler on the specified node pool with the requested node count limits.
To enable dynamic node scaling on an existing GKE Standard node pool, the `gcloud container node-pools update` command must be used with the `--enable-autoscaling` flag, specifying `--min-nodes` and `--max-nodes` parameters.
Adım Adım Çözüm
Anahtar Kavram
Configuring GKE Cluster Autoscaler on Existing Node Pools