
Answer-first summary for fast verification
Answer: `gcloud container clusters resize project-1 --node pool 'primary-node-pool' --num-nodes 20`
The correct command is `gcloud container clusters resize project-1 --node-pool 'primary-node-pool' --num-nodes 20`. This command is specifically designed for resizing node pools in Google Kubernetes Engine (GKE) clusters. The `--node-pool` option specifies the name of the node pool to resize, and `--num-nodes` defines the desired new size. Other options are incorrect because: - `gcloud container clusters update` is not used for resizing node pools. - `kubectl` is for interacting with Kubernetes resources, not managing GKE clusters. - The `--size` flag is not the correct parameter for specifying the number of nodes in this context.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have a Kubernetes Engine cluster named 'project-1' with a node pool named 'primary-node-pool'. To meet increased capacity demands, you need to scale the number of nodes in this pool from 10 to 20. What is the correct command to achieve this?
A
gcloud container clusters update project-1 --node pool 'primary-node-pool' --num-nodes 20
B
kubectl container clusters update project-1 --node pool 'primary-node-pool' --num-nodes 20
C
gcloud container clusters resize project-1 --node pool 'primary-node-pool' --size 20
D
gcloud container clusters resize project-1 --node pool 'primary-node-pool' --num-nodes 20
No comments yet.