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' with 3 nodes in the us-east1-b zone using the command line.
Which gcloud command should you use?
You need to deploy a new Google Kubernetes Engine (GKE) Standard cluster named 'prod-cluster' with 3 nodes in the us-east1-b zone using the command line.
Which gcloud command should you use?
Answer options:
A.
gcloud compute clusters create prod-cluster --nodes=3 --zone=us-east1-b
B.
gcloud container clusters create prod-cluster --num-nodes=3 --zone=us-east1-b
C.
kubectl create cluster prod-cluster --nodes=3 --zone=us-east1-b
D.
gcloud kubernetes clusters create prod-cluster --num-nodes=3 --zone=us-east1-b
How to approach this question
Remember that in gcloud, GKE is managed under the 'container' component.
Full Answer
B.gcloud container clusters create prod-cluster --num-nodes=3 --zone=us-east1-b✓ Correct
gcloud container clusters create prod-cluster --num-nodes=3 --zone=us-east1-b
To manage Google Kubernetes Engine (GKE) resources using the Cloud SDK, you use the `gcloud container` command group. The correct command to create a cluster is `gcloud container clusters create [CLUSTER_NAME]`. You then use flags like `--num-nodes` and `--zone` to configure it. `kubectl` is used later to deploy applications *onto* the cluster, not to create the cluster infrastructure.
Common mistakes
Using `kubectl` to try and create the cluster, or using `gcloud compute` instead of `gcloud container`.
Practice the full GCP Associate Cloud Engineer Practice Exam 6
50 questions · hints · full answers · grading
More questions from this exam
Q01What is the primary purpose of a Google Cloud project?EasyQ02Your development team needs to manage Compute Engine instances in a specific project. They need t...MediumQ03You are automating the setup of a new Google Cloud project using a bash script. You need to enabl...EasyQ04Your startup has a strict monthly cloud budget of $500. You want to be notified immediately if yo...MediumQ05Your finance team wants to perform granular analysis of your Google Cloud spending using SQL. The...Hard
Expert