Your company's workload runs on a zonal GKE cluster named "web-prod" in us-central1-a. The cluster currently has two node pools: "default-pool" (n1-standard-1) and "highmem-pool" (n2-highmem-4). All Deployments have been migrated to schedule only on "highmem-pool". You must permanently remove "default-pool" to lower costs while ensuring running Pods are evicted gracefully and without creating orphaned managed instance groups. Which gcloud command should you run?
Run gcloud container clusters update web-prod --remove-node-pools=default-pool --zone=us-central1-a.
Scale the pool to zero with gcloud container clusters resize web-prod --node-pool=default-pool --size=0 --zone=us-central1-a and leave it in place.
Delete the underlying managed instance group with gcloud compute instance-groups managed delete gke-web-prod-default-pool-* --zone=us-central1-a.
Run gcloud container node-pools delete default-pool --cluster=web-prod --zone=us-central1-a and confirm the prompt.
The supported way to remove a node pool from a GKE cluster is to use the dedicated gcloud container node-pools delete command and identify the pool, the parent cluster, and its location. When this command runs, GKE cordons and drains all nodes in the pool, reschedules any Pods onto remaining schedulable nodes ("highmem-pool" in this case), and then deletes the underlying managed instance group, so no orphaned resources remain. Deleting the Compute Engine managed instance group directly would cause GKE to recreate the pool, scaling the pool to zero leaves the pool (and its metadata) in place, and there is no --remove-node-pools flag on gcloud container clusters update. Therefore, using:
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does 'cordoning and draining' mean in GKE?
Open an interactive chat with Bash
What is the role of a managed instance group in GKE?
Open an interactive chat with Bash
Why can't you use 'gcloud container clusters resize' to remove a node pool?
Open an interactive chat with Bash
What does cordoning and draining nodes mean in GKE?
Open an interactive chat with Bash
What is the difference between scaling a pool to zero and deleting a node pool in GKE?
Open an interactive chat with Bash
What happens if you delete a managed instance group directly instead of using gcloud container node-pools delete?
Open an interactive chat with Bash
GCP Associate Cloud Engineer
Ensuring successful operation of a cloud solution
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .