A cloud administrator manages an existing production Cloud Run service named `reporting-service` in the `us-central1` region. To mitigate cold start latency during morning traffic spikes while ensuring monthly compute costs do not exceed budget, the administrator needs to keep at least 5 warm instances idle and cap maximum scaling at 50 instances. Which `gcloud` command should the administrator execute to update these operational parameters?
- gcloud run services update reporting-service --min-instances 5 --max-instances 50 --region us-central1Answer
- Bgcloud functions deploy reporting-service --min-instances 5 --max-instances 50 --region us-central1
- Cgcloud run services update-traffic reporting-service --to-revisions LATEST=50 --region us-central1
- Dgcloud projects add-iam-policy-binding my-project --member=serviceAccount:[email protected] --role=roles/editor
Answer
Execute the `gcloud run services update` command specifying the service name, `--min-instances 5`, `--max-instances 50`, and the deployment region.
The correct command uses `gcloud run services update` with `--min-instances 5` and `--max-instances 50`. This properly configures the scaling bounds of an existing Cloud Run service to keep 5 warm instances available while capping total instances at 50.
Step-by-Step Solution
Key Concept
Managing Cloud Run scaling parameters and instance limits via gcloud CLI