An infrastructure engineer manages a Google Kubernetes Engine (GKE) Standard cluster hosting a memory-intensive data processing workload in a node pool named `analytics-pool`. The current nodes using `e2-standard-4` machine types are consistently running out of memory. The engineer must upgrade `analytics-pool` to use `e2-standard-8` machine types with minimal disruption to running pods. Which operational procedure should the engineer perform?
- Create a new node pool with the `e2-standard-8` machine type, cordon and drain the nodes in `analytics-pool`, and then delete `analytics-pool` once workloads migrate.Cevap
- BRun `gcloud container node-pools update analytics-pool --machine-type=e2-standard-8` to change the VM instance size of the active nodes in place.
- CConfigure the Horizontal Pod Autoscaler (HPA) targeting `analytics-pool` to automatically scale up the memory capacity of individual worker nodes.
- DExecute `gcloud container clusters update --enable-autopilot` on the cluster so GKE automatically resizes the existing node instances to fit larger workloads.
Cevap
Create a new node pool with the required machine type, cordon and drain the existing node pool nodes, and delete the original node pool after workloads successfully migrate.
Because node VM machine types in GKE node pools are immutable once created, changing node hardware specifications requires creating a new node pool with the desired machine type (`e2-standard-8`), safely draining workloads off the old nodes using `kubectl cordon` and `kubectl drain`, and deleting the old node pool once migration completes.
Adım Adım Çözüm
Anahtar Kavram
GKE Node Pool Migration & Machine Type Immutability
Tahmini Süre:2m 0s