A Cloud Engineer needs to perform maintenance on a Google Kubernetes Engine (GKE) Standard cluster by replacing an existing node pool with a new machine-type node pool, while ensuring zero workload downtime. Arrange the operational CLI steps in the correct sequential order from first to last to complete this node pool migration safely.
- 1Create the new target node pool using `gcloud container node-pools create`.
- 2Mark nodes in the old pool as unschedulable using `kubectl cordon`.
- 3Gracefully evict running pods from old nodes using `kubectl drain --ignore-daemonsets`.
- 4Verify workload status and node placement using `kubectl get pods -o wide`.
- 5Decommission the old node pool using `gcloud container node-pools delete`.
Cevap
The correct sequence is: 1) Create the new target node pool using gcloud container node-pools create, 2) Mark nodes in the old pool as unschedulable using kubectl cordon, 3) Gracefully evict running pods from old nodes using kubectl drain --ignore-daemonsets, 4) Verify workload status and node placement using kubectl get pods -o wide, and 5) Decommission the old node pool using gcloud container node-pools delete.
Safe migration requires creating destination capacity first (gcloud container node-pools create), blocking new pod placement on old nodes (kubectl cordon), gracefully evicting existing workloads (kubectl drain), validating that all pods are healthy on the new pool (kubectl get pods -o wide), and finally deleting the deprecated node pool (gcloud container node-pools delete).
Adım Adım Çözüm
Anahtar Kavram
GKE Zero-Downtime Manual Node Pool Migration Workflow