
Answer-first summary for fast verification
Answer: Create a new node pool in the same cluster, and migrate the workload to the new pool.
**Correct Option:** B. Create a new node pool in the same cluster, and migrate the workload to the new pool: This is the correct approach because Google Kubernetes Engine (GKE) does not allow changing the machine type of existing nodes directly. The recommended method is to create a new node pool with the desired machine type (n1-standard-4), migrate the workloads to the new pool, and then delete the old node pool. **Incorrect Options:** A. gcloud container clusters update project-1 --machine-type n1-standard-4: Incorrect because the update command does not support changing node pool machine types. C. gcloud container clusters migrate project-1 --machine-type n1-standard-4: Incorrect as there's no migrate command in the gcloud tool for GKE clusters. D. gcloud container clusters resize project-1 --machine-type n1-standard-4: Incorrect because the resize command changes the number of nodes, not their machine type.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You've set up a Kubernetes Engine cluster named 'project-1' and now need to upgrade the machine type from n1-standard-1 to n1-standard-4. Which command should you use to achieve this?
A
gcloud container clusters update project-1 --machine-type n1-standard-4
B
Create a new node pool in the same cluster, and migrate the workload to the new pool.
C
gcloud container clusters migrate project-1 --machine-type n1-standard-4
D
gcloud container clusters resize project-1 --machine-type n1-standard-4
No comments yet.