Medium1 markMultiple Choice

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 'prod-cluster' in the 'us-central1-a' zone with exactly 3 nodes.

Which gcloud command should you use?

Answer options:

A.

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

B.

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

C.

gcloud kubernetes clusters create prod-cluster --zone=us-central1-a --num-nodes=3

D.

gcloud container create cluster prod-cluster --zone=us-central1-a --size=3

How to approach this question

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

Full Answer

B.gcloud container clusters create prod-cluster --zone=us-central1-a --num-nodes=3✓ Correct
gcloud container clusters create prod-cluster --zone=us-central1-a --num-nodes=3
To manage GKE resources via the CLI, you use the `gcloud container` command group. The correct command to create a cluster is `gcloud container clusters create [CLUSTER_NAME]`. The flag for the number of nodes is `--num-nodes`.

Common mistakes

Guessing `gcloud kubernetes` or `gcloud compute`.

Practice the full GCP Associate Cloud Engineer Practice Exam 2

50 questions · hints · full answers · grading

More questions from this exam