A cloud engineer is managing a Google Kubernetes Engine (GKE) Standard cluster named `app-cluster` in zone `us-east1-b`. During a peak traffic period, the engineer scales up a web service Deployment, but several new Pods remain stuck in a `Pending` state with `Insufficient cpu` event messages. The existing node pool named `web-pool` has reached its current node limit, and node autoscaling is disabled. The engineer needs to enable node autoscaling specifically for `web-pool` so that GKE dynamically provisions additional underlying Compute Engine instances when Pods cannot be scheduled, establishing a minimum limit of 2 nodes and a maximum limit of 8 nodes. Which `gcloud` command must the engineer execute to resolve this issue?
- gcloud container node-pools update web-pool --cluster=app-cluster --zone=us-east1-b --enable-autoscaling --min-nodes=2 --max-nodes=8Answer
- Bkubectl autoscale deployment web-app --min=2 --max=8 --cpu-percent=80
- Cgcloud container clusters update app-cluster --zone=us-east1-b --enable-autoscaling --min-nodes=2 --max-nodes=8
- Dgcloud container clusters update app-cluster --zone=us-east1-b --enable-autopilot
Answer
Execute `gcloud container node-pools update web-pool --cluster=app-cluster --zone=us-east1-b --enable-autoscaling --min-nodes=2 --max-nodes=8`.
The correct command uses `gcloud container node-pools update` targeted at the `web-pool` node pool in cluster `app-cluster`. Providing `--enable-autoscaling` along with `--min-nodes=2` and `--max-nodes=8` configures GKE Cluster Autoscaler to automatically adjust the node count when pending Pods require additional compute resources.
Step-by-Step Solution
Key Concept
Configuring GKE Cluster Autoscaler on node pools to resolve unschedulable Pod resource constraints.
Estimated Time:2m 0s