
Explanation:
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, which is the recommended way to resize a node pool. The other options are incorrect for the following reasons:
kubectl with container clusters update is not valid as kubectl does not accept container as an operation.gcloud container clusters update command cannot be used to specify the number of nodes; it's used for updating node locations.gcloud container clusters resize command does not support the --new-size parameter; --num-nodes should be used instead.References:
Ultimate access to all questions.
No comments yet.
You have a Kubernetes Engine cluster named 'my-gcp-ace-proj-1' with a node pool named 'my-gcp-ace-primary-node-pool'. To accommodate increased demand, you need to scale the number of nodes in your node pool from 10 to 20. Which command should you use 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