Medium1 markMultiple Choice
GCP ACE · Question 23 · Domain 3.2: Deploying and implementing GKE resources
You have successfully created a GKE cluster and configured your local kubectl to connect to it. You have a container image named gcr.io/my-project/my-app:v1.
Which command should you use to deploy this image to your cluster as a Deployment?
You have successfully created a GKE cluster and configured your local kubectl to connect to it. You have a container image named gcr.io/my-project/my-app:v1.
Which command should you use to deploy this image to your cluster as a Deployment?
Answer options:
A.
gcloud container deploy my-app --image=gcr.io/my-project/my-app:v1
B.
kubectl run my-app --image=gcr.io/my-project/my-app:v1
C.
kubectl create deployment my-app --image=gcr.io/my-project/my-app:v1
D.
docker run -d gcr.io/my-project/my-app:v1
How to approach this question
Identify the Kubernetes CLI tool and the specific command to create a Deployment.
Full Answer
C.kubectl create deployment my-app --image=gcr.io/my-project/my-app:v1✓ Correct
Once a GKE cluster is running, you use `kubectl` to deploy applications. The imperative command to create a Deployment (which manages replica sets and pods) is `kubectl create deployment [NAME] --image=[IMAGE_URL]`.
Common mistakes
Using `gcloud` commands. Remember: `gcloud` builds the cluster; `kubectl` deploys the apps.
Practice the full GCP Associate Cloud Engineer Practice Exam 7
50 questions · hints · full answers · grading
More questions from this exam
Q01You are starting a new initiative and need to create a new Google Cloud project using the Cloud S...EasyQ02Your company is migrating to Google Cloud and wants to manage user identities centrally. They cur...MediumQ03You have just created a new Google Cloud project and want to deploy a containerized application u...MediumQ04Your finance team wants to perform complex SQL queries on your Google Cloud billing data to analy...MediumQ05You are managing a development project in Google Cloud. You want to ensure that you are notified ...Easy
Expert