A DevOps engineer is managing a Google Kubernetes Engine (GKE) Standard cluster named `analytics-cluster` located in region `us-central1`. The cluster contains a node pool named `worker-pool` that experiences variable compute demands throughout the day. The engineer needs to configure GKE to automatically adjust the number of worker VM instances in `worker-pool` based on unschedulable pending pods, while strictly maintaining a minimum of 3 nodes and a maximum of 12 nodes per zone. Which command should the engineer run to accomplish this goal?
- gcloud container node-pools update worker-pool --cluster=analytics-cluster --region=us-central1 --enable-autoscaling --min-nodes=3 --max-nodes=12Cevap
- Bkubectl autoscale deployment worker-pool --min=3 --max=12 --cpu-percent=80
- Cgcloud container clusters update analytics-cluster --region=us-central1 --node-pool=worker-pool --num-nodes=12
- Dgcloud compute instance-groups managed update worker-pool --region=us-central1 --size=12
Cevap
Execute `gcloud container node-pools update worker-pool --cluster=analytics-cluster --region=us-central1 --enable-autoscaling --min-nodes=3 --max-nodes=12`.
The command `gcloud container node-pools update worker-pool --cluster=analytics-cluster --region=us-central1 --enable-autoscaling --min-nodes=3 --max-nodes=12` correctly enables and configures the GKE Cluster Autoscaler for the specified node pool with the requested lower and upper node limits.
Adım Adım Çözüm
Anahtar Kavram
GKE Cluster Autoscaler Node Pool Management
Tahmini Süre:2m 0s