An engineer needs to provision a GKE cluster with a node pool that uses preemptible VMs to reduce costs. Which gcloud command should they use?
Trap 1: gcloud container clusters update --preemptible
Preemptibility is set at node pool creation, not cluster update.
Trap 2: gcloud container clusters create --preemptible-nodes
There is no --preemptible-nodes flag; the flag is --preemptible on the node-pool create command.
Trap 3: gcloud compute instances create --preemptible
This creates a standalone VM, not a GKE node pool.
- A
gcloud container clusters update --preemptible
Why wrong: Preemptibility is set at node pool creation, not cluster update.
- B
gcloud container clusters create --preemptible-nodes
Why wrong: There is no --preemptible-nodes flag; the flag is --preemptible on the node-pool create command.
- C
gcloud compute instances create --preemptible
Why wrong: This creates a standalone VM, not a GKE node pool.
- D
gcloud container node-pools create --preemptible
This correctly creates a node pool with preemptible VMs.