Medium1 markMultiple Choice
GCP ACE · Question 23 · Domain 3.2: Deploying and implementing GKE resources
You have a GKE cluster running and you have written a Kubernetes Deployment manifest file named app-deployment.yaml. You want to deploy this application to your cluster.
Which command should you run?
You have a GKE cluster running and you have written a Kubernetes Deployment manifest file named app-deployment.yaml. You want to deploy this application to your cluster.
Which command should you run?
Answer options:
A.
gcloud container deployments create app-deployment.yaml
B.
kubectl apply -f app-deployment.yaml
C.
kubectl run app-deployment.yaml
D.
gcloud run deploy --file app-deployment.yaml
How to approach this question
Identify the standard Kubernetes command for applying declarative manifests.
Full Answer
B.kubectl apply -f app-deployment.yaml✓ Correct
kubectl apply -f app-deployment.yaml
While `gcloud` is used to manage GCP infrastructure (like creating the GKE cluster), `kubectl` is the Kubernetes command-line tool used to deploy and manage applications inside the cluster. `kubectl apply -f [FILENAME]` is the standard declarative command to deploy resources defined in a YAML manifest.
Common mistakes
Trying to use `gcloud` to deploy Kubernetes pods/deployments.
Practice the full GCP Associate Cloud Engineer Practice Exam 4
50 questions · hints · full answers · grading
More questions from this exam
Q01You have recently joined a new team and need to set up a new Google Cloud project for a developme...EasyQ02Your company uses Google Workspace. You need to grant a new developer, Alice, the ability to view...MediumQ03You have created a new GCP project and want to deploy a Compute Engine instance. However, when yo...MediumQ04Your startup has a strict monthly cloud budget of $500. You want to be notified via email when yo...EasyQ05Your finance team wants to analyze Google Cloud costs using standard SQL and build custom dashboa...Medium
Expert