Easy1 markMultiple Choice

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

You need to create a new Google Kubernetes Engine (GKE) cluster named 'web-cluster' in the us-central1-a zone using the Cloud SDK.

Which command should you use?

Answer options:

A.

gcloud compute clusters create web-cluster --zone us-central1-a

B.

gcloud container clusters create web-cluster --zone us-central1-a

C.

kubectl create cluster web-cluster --zone us-central1-a

D.

gcloud gke clusters create web-cluster --zone us-central1-a

How to approach this question

Remember the gcloud command group for GKE.

Full Answer

B.gcloud container clusters create web-cluster --zone us-central1-a✓ Correct
gcloud container clusters create web-cluster --zone us-central1-a
In the Google Cloud SDK, commands related to Google Kubernetes Engine (GKE) are located under the `gcloud container` group. The command to create a cluster is `gcloud container clusters create [CLUSTER_NAME]`.

Common mistakes

Choosing `kubectl create cluster`. `kubectl` interacts with the Kubernetes API server *after* the cluster exists. `gcloud` interacts with the GCP API to provision the infrastructure.

Practice the full GCP Associate Cloud Engineer Practice Exam 7

50 questions · hints · full answers · grading

More questions from this exam