Easy1 markMultiple Choice
Domain 3.2: Deploying and implementing GKE resourcesDomain 3.2GKEgcloudCluster Creation

GCP ACE · Question 22 · Domain 3.2: Deploying and implementing GKE resources

You need to deploy a new Google Kubernetes Engine (GKE) Standard cluster named 'my-cluster' with 3 nodes in the us-central1-a zone.

Which gcloud command should you use?

Answer options:

A.

gcloud compute clusters create my-cluster --nodes=3 --zone=us-central1-a

B.

gcloud container clusters create my-cluster --num-nodes=3 --zone=us-central1-a

C.

kubectl create cluster my-cluster --nodes=3 --zone=us-central1-a

D.

gcloud gke clusters create my-cluster --num-nodes=3 --zone=us-central1-a

How to approach this question

Remember that GKE commands in the gcloud CLI fall under the 'container' command group.

Full Answer

B.gcloud container clusters create my-cluster --num-nodes=3 --zone=us-central1-a✓ Correct
The correct command to create a GKE cluster is `gcloud container clusters create [CLUSTER_NAME]`. You use `--num-nodes` to specify the size of the default node pool and `--zone` to specify the location.

Common mistakes

Using `kubectl` to try and create the cluster, or using the wrong gcloud group like `compute`.

Practice the full GCP Associate Cloud Engineer Practice Exam 3

50 questions · hints · full answers · grading

More questions from this exam