You need to manually migrate running microservice workloads from an existing Google Kubernetes Engine (GKE) node pool to a newly created node pool with minimal disruption. Arrange the following operational steps in the correct execution sequence.
- 1Provision the target node pool within the GKE cluster using gcloud container node-pools create.
- 2Mark the existing nodes in the original node pool as unschedulable using kubectl cordon.
- 3Evict running pods from the original nodes using kubectl drain --ignore-daemonsets.
- 4Remove the old node pool from the GKE cluster using gcloud container node-pools delete.
Answer
The correct sequence is: provision the new node pool (gcloud container node-pools create), cordon the original nodes (kubectl cordon), drain the original nodes (kubectl drain), and delete the empty node pool (gcloud container node-pools delete).
Safe workload migration between GKE node pools requires creating the new node pool first so target capacity exists. Next, cordoning the old nodes ensures no new pods land on them. Draining the old nodes then evicts running workloads, allowing Kubernetes to reschedule them onto the new node pool. Finally, deleting the old node pool cleans up unused GCP resources.
Step-by-Step Solution
Key Concept
Manual GKE Node Pool Migration and Node Lifecycle Management
Estimated Time:1m 30s