A cloud engineer needs to deploy a containerized backend processing microservice to Google Cloud Run in the europe-west1 region using the gcloud CLI. The application image is stored in Artifact Registry. Security policies require that the service must prevent unauthenticated ingress traffic and run with a specific user-managed runtime service account named [email protected] to access downstream Google Cloud databases. Which gcloud command correctly deploys the service in accordance with these security requirements?
- gcloud run deploy processor-service --image=europe-west1-docker.pkg.dev/my-project/repo/processor:v1 --region=europe-west1 --no-allow-unauthenticated --service-account=processor-sa@my-project.iam.gserviceaccount.comCevap
- Bgcloud functions deploy processor-service --image=europe-west1-docker.pkg.dev/my-project/repo/processor:v1 --region=europe-west1 --no-allow-unauthenticated --service-account=processor-sa@my-project.iam.gserviceaccount.com
- Cgcloud run deploy processor-service --image=europe-west1-docker.pkg.dev/my-project/repo/processor:v1 --zone=europe-west1-a --no-allow-unauthenticated --service-account=processor-sa@my-project.iam.gserviceaccount.com
- Dgcloud run deploy processor-service --image=europe-west1-docker.pkg.dev/my-project/repo/processor:v1 --region=europe-west1 --allow-unauthenticated --service-account=processor-sa@my-project.iam.gserviceaccount.com
Cevap
The correct command uses `gcloud run deploy` with `--region=europe-west1`, `--no-allow-unauthenticated`, and `--service-account=processor-sa@my-project.iam.gserviceaccount.com`.
The command correctly uses `gcloud run deploy` to provision a containerized Cloud Run service, sets the regional deployment scope to `europe-west1`, prevents public unauthenticated access using `--no-allow-unauthenticated`, and binds the dedicated identity using `--service-account`.
Adım Adım Çözüm
Anahtar Kavram
Deploying containerized serverless applications using gcloud run deploy with custom runtime service accounts and authentication flags.
Tahmini Süre:2m 0s