A software engineering team is deploying a custom containerized internal service named billing-service to Google Cloud Run in the us-central1 region. The application container is hardcoded to listen for incoming gRPC traffic on TCP port 5000 rather than the default port 8080. The service must execute under a specific non-default service account named [email protected] and must block unauthenticated public invocations. Which gcloud command correctly deploys this service according to the security and operational requirements?
- gcloud run deploy billing-service --image=gcr.io/my-project/billing-service:v1 --port=5000 [email protected] --no-allow-unauthenticatedCevap
- Bgcloud run deploy billing-service --image=gcr.io/my-project/billing-service:v1 --set-env-vars=CUSTOM_PORT=5000 [email protected] --no-allow-unauthenticated
- Cgcloud functions deploy billing-service --image=gcr.io/my-project/billing-service:v1 --port=5000 [email protected] --no-allow-unauthenticated
- Dgcloud run deploy billing-service --image=gcr.io/my-project/billing-service:v1 --port=5000 --role=roles/editor --no-allow-unauthenticated
Cevap
The correct deployment command is gcloud run deploy billing-service --image=gcr.io/my-project/billing-service:v1 --port=5000 [email protected] --no-allow-unauthenticated.
The correct command uses gcloud run deploy with --port=5000 to direct incoming traffic to the container's listening port, --service-account to bind the dedicated IAM identity, and --no-allow-unauthenticated to restrict unauthenticated access.
Adım Adım Çözüm
Anahtar Kavram
Deploying containerized workloads on Cloud Run with non-default port bindings, custom service accounts, and IAM ingress controls.