ASSOCIATE-CLOUD-ENGINEER · Question #63
What is the gcloud command to create a cluster named ch09-cluster-10 with four nodes?
The correct answer is B. gcloud container clusters create ch09-cluster-10 --num-nodes=4. This question asks for the correct gcloud command to create a Google Kubernetes Engine (GKE) cluster with a specified number of nodes.
Question
Options
- Agcloud container clusters create ch09-cluster-10 4
- Bgcloud container clusters create ch09-cluster-10 --num-nodes=4
- Cgcloud clusters container create ch09-cluster-10 --num-nodes=4
- Dgcloud container clusters create ch09-cluster-10 --nodes-num=4
How the community answered
(34 responses)- A3% (1)
- B94% (32)
- D3% (1)
Why each option
This question asks for the correct gcloud command to create a Google Kubernetes Engine (GKE) cluster with a specified number of nodes.
Passing the number '4' directly after the cluster name is not the correct syntax for specifying the node count.
The command `gcloud container clusters create` is used to create GKE clusters, and the `--num-nodes=4` flag is the correct way to specify that the cluster should be created with four worker nodes.
The subcommand order `clusters container` is incorrect; it should be `container clusters`.
The flag `--nodes-num` is not a valid option; the correct flag is `--num-nodes`.
Concept tested: GKE Cluster Creation with Node Count
Source: https://cloud.google.com/sdk/gcloud/reference/container/clusters/create
Topics
Community Discussion
No community discussion yet for this question.