Question

Difficulty: HardManaging Cloud Run Resources

An infrastructure team manages a production Cloud Run service named `data-processor` running in the `europe-west1` region. To mitigate cold start latency during bursty traffic windows while establishing strict cost controls, a Cloud Engineer is instructed to reconfigure the service to maintain at least 3 warm container instances, cap the maximum scaling limit to 25 container instances, and allow each instance to process up to 100 simultaneous requests. The change must be applied to the existing running service configuration without re-deploying a new container image. Which `gcloud` command should the engineer execute?

  1. gcloud run services update data-processor --min-instances=3 --max-instances=25 --concurrency=100 --region=europe-west1Answer
  2. B
    gcloud run services update-traffic data-processor --min-instances=3 --max-instances=25 --concurrency=100 --region=europe-west1
  3. C
    gcloud functions deploy data-processor --min-instances=3 --max-instances=25 --concurrency=100 --region=europe-west1
  4. D
    gcloud run deploy data-processor --min-nodes=3 --max-nodes=25 --container-concurrency=100 --zone=europe-west1-a

Answer

Execute `gcloud run services update data-processor --min-instances=3 --max-instances=25 --concurrency=100 --region=europe-west1` to modify operational parameters on an existing Cloud Run service.
Updating operational settings like minimum instances, maximum instances, and per-instance concurrency on an existing Cloud Run service is performed using `gcloud run services update` with the `--min-instances`, `--max-instances`, `--concurrency`, and `--region` flags. This command creates a new revision with the updated operational configuration without requiring a new container image binary to be specified.

Step-by-Step Solution

1
Identify the target resource management task
The requirement is to update operational properties (min instances, max instances, concurrency) of an existing Cloud Run service without deploying new container code.
Cloud Run service settings can be updated independently of container image deployments.
2
Select the correct gcloud command group and sub-command
Use `gcloud run services update` because `services update` modifies configuration flags on existing services.
`gcloud run deploy` requires specifying a container image, whereas `services update` applies changes directly to the existing service configuration.
3
Validate the required parameters and flag syntax
Combine `--min-instances=3`, `--max-instances=25`, `--concurrency=100`, and `--region=europe-west1`.
Cloud Run uses `--min-instances` and `--max-instances` for autoscaling boundaries, `--concurrency` for per-instance request limits, and regional targeting via `--region`.

Key Concept

Managing Cloud Run scaling bounds and concurrency via gcloud run services update
Rate this question