Google Associate Cloud Engineer

Google Associate Cloud Engineer

Get started today

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?




Explanation:

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.