
Answer-first summary for fast verification
Answer: `gcloud container clusters resize my-gcp-ace-proj-1 --node-pool my-gcp-ace-primary-node-pool --num-nodes 20`
The correct command is `gcloud container clusters resize my-gcp-ace-proj-1 --node-pool my-gcp-ace-primary-node-pool --num-nodes 20`. This command uses the `--num-nodes` parameter to specify the target number of nodes in the cluster pool. The other options are incorrect for the following reasons: - Option A uses `gcloud container clusters update`, which cannot be used to change the number of nodes. - Option C incorrectly uses `kubectl`, which does not accept 'container' as an operation. - Option D uses `--new-size`, which is not a supported parameter for the `gcloud container clusters resize` command. The `--size` parameter is deprecated in favor of `--num-nodes`. For more information, refer to the [Google Cloud SDK documentation](https://cloud.google.com/sdk/gcloud/reference/container/clusters/resize).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You've created a Kubernetes engine cluster named 'my-gcp-ace-proj-1', which has a cluster pool named 'my-gcp-ace-primary-node-pool'. To meet increasing capacity demands, you need to increase the number of nodes within your cluster pool from 10 to 20. What is the correct command to achieve this?
A
gcloud container clusters update my-gcp-ace-proj-1 --node-pool my-gcp-ace-primary-node-pool --num-nodes 20
B
gcloud container clusters resize my-gcp-ace-proj-1 --node-pool my-gcp-ace-primary-node-pool --num-nodes 20
C
kubectl container clusters update my-gcp-ace-proj-1 --node-pool my-gcp-ace-primary-node-pool --num-nodes 20
D
gcloud container clusters resize my-gcp-ace-proj-1 --node-pool my-gcp-ace-primary-node-pool --new-size 20