Professional Cloud Developer free question 6 / 10 · Domain 3: Configuring cloud-native applications for deployment
A new Cloud Run revision is deployed, but its container never passes its startup probe during the deployment. What does Cloud Run do by default?
- It deletes the failed revision right away and the deployment command returns a success message
- It routes traffic to the revision anyway and keeps probing until the container passes
- It marks the revision as unhealthy and does not route traffic to that revision
- It skips the check on the first revision of a service and applies it to later revisions
Show the answer and explanation
Answer: C
Why this is correct
By default Cloud Run checks that a deployment is healthy: it starts an instance and waits for the startup probe to pass. If the check fails, the revision is marked as unhealthy and traffic is not routed to it. The check can be disabled, for example to speed up deployment, with the --no-deploy-health-check flag on gcloud run deploy or the equivalent YAML or Terraform setting. Disabling it removes this safety net, so a revision whose container cannot start would not be caught at deploy time.
Why the other options are wrong
"It routes traffic to the revision anyway and keeps probing until the container passes" … By default the deployment health check starts an instance and waits for the startup probe. A revision that fails the check is not sent traffic.
"It skips the check on the first revision of a service and applies it to later revisions" … The page describes the check as a default of every deployment. It is turned off only with the --no-deploy-health-check flag, not by the revision's position.
"It deletes the failed revision right away and the deployment command returns a success message" … The page says the revision is marked as unhealthy, not deleted. A failed health check is an unsuccessful deployment, not a successful one.
Key point
The deployment health check protects traffic from revisions that cannot start. Disable it only when you accept that risk for faster deploys.