mediumMultiple ChoiceObjective-mapped
Google ACE Practice Question: A team wants to deploy a container image at…
A team wants to deploy a container image at 'gcr.io/myproject/api:v2' as a Cloud Run service named 'api-service' in us-east1, accessible without authentication. Which command is correct?
⚠ Common exam trap
Google Cloud often tests the distinction between `gcloud run deploy` and `gcloud run create`, and the use of `--allow-unauthenticated` versus `--no-auth`, to catch candidates who confuse command syntax or flag names.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
gcloud run deploy api-service --image=gcr.io/myproject/api:v2 --region=us-east1 --allow-unauthenticated
It uses the `gcloud run deploy` command with the `--image` flag to specify the container image, `--region=us-east1` to target the correct region, and `--allow-unauthenticated` to make the service publicly accessible without authentication. This matches the exact requirements for deploying a Cloud Run service with public access.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
gcloud run deploy api-service --image=gcr.io/myproject/api:v2 --region=us-east1 --allow-unauthenticated
Why this is correct
This is the correct syntax for deploying a Cloud Run service. The service name `api-service` is supplied positionally, `--image` points to the container image `gcr.io/myproject/api:v2`, `--region` selects the deployment region, and `--allow-unauthenticated` grants public access by binding the `roles/run.invoker` role to `allUsers`. This makes the service reachable via HTTP without requiring authentication credentials, which is the typical requirement for an external API.
- ✗
gcloud run create api-service --image=gcr.io/myproject/api:v2 --zone=us-east1 --public
Why it's wrong here
`gcloud run create` is not a valid command; the correct verb is `deploy`, as in `gcloud run deploy`. Cloud Run is a regional service, not zonal, so `--zone=us-east1` is invalid and must be replaced with `--region=us-east1`. Also, `--public` is not a real flag; unauthicanted public access is enabled via `--allow-unauthenticated`.
- ✗
gcloud cloud-run deploy api-service --container=gcr.io/myproject/api:v2 --region=us-east1
Why it's wrong here
`gcloud cloud-run` is not a valid command group in the gcloud CLI; the correct group is `gcloud run`. Additionally, `--container` is not a parameter for `gcloud run deploy`; you must use the `--image` flag to specify the container image. Because of these invalid flags and command group, the command would be rejected with a syntax error and would not deploy anything.
- ✗
gcloud run deploy --name=api-service --image=gcr.io/myproject/api:v2 --region=us-east1 --no-auth
Why it's wrong here
This command is invalid because `gcloud run deploy` expects the service name as a positional argument, not a `--name` flag. Additionally, `--no-auth` is not a recognized flag in the gcloud CLI; to allow unauthenticated invocations you must use `--allow-unauthenticated`. Without that correct flag, the deployment would not succeed even if the service name were correctly provided.
Go deeper
Related to this question
Learn chapter
Google Cloud Platform Overview
Key term
Cloud Run
Cloud Run is a fully managed compute platform from Google Cloud that lets you run containerized applications in a serverless environment, automatically scaling from zero to thousands of requests.
Key term
Region
A region is a distinct geographic location where a cloud provider operates multiple data centers that are connected by low-latency networks and provide cloud services.
About these practice questions
One of 769 original ACE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.