Your organization runs a batch processing pipeline on a Google Kubernetes Engine (GKE) Standard cluster named `prod-cluster` in zone `us-central1-a`. During daily peak processing hours, incoming pod workloads enter a `Pending` state because the existing node pool named `analytics-pool` reaches its maximum capacity. You need to configure the cluster infrastructure so that GKE automatically provisions additional compute nodes in `analytics-pool` when pods cannot be scheduled due to resource constraints, up to a maximum limit of 15 nodes, and scales down node count during off-peak hours. Which command should you execute to meet this requirement?
- Akubectl autoscale deployment analytics-pool --min=2 --max=15 --cpu-percent=80
- gcloud container node-pools update analytics-pool --cluster=prod-cluster --enable-autoscaling --min-nodes=2 --max-nodes=15 --zone=us-central1-aAnswer
- Cgcloud container node-pools update analytics-pool --cluster=prod-cluster --enable-spot-nodes --max-nodes=15 --zone=us-central1-a
- Dgcloud container clusters update prod-cluster --enable-autopilot --node-pool=analytics-pool --zone=us-central1-a
Answer
The command 'gcloud container node-pools update analytics-pool --cluster=prod-cluster --enable-autoscaling --min-nodes=2 --max-nodes=15 --zone=us-central1-a' is the correct choice because it enables GKE Cluster Autoscaler on the specific node pool.
Enabling cluster autoscaling on a GKE Standard node pool via 'gcloud container node-pools update' with the '--enable-autoscaling', '--min-nodes', and '--max-nodes' flags allows GKE to automatically adjust the node pool capacity between the specified limits when pods cannot be scheduled.
Step-by-Step Solution
Key Concept
Configuring GKE Cluster Autoscaler on Existing Node Pools
Estimated Time:2m 0s