A logistics company is deploying a custom Go-based tracking service to Google Cloud Run. The containerized application inside the image listens on TCP port , and the deployment policy requires the endpoint to be publicly reachable on the web without requiring IAM authentication. Which TWO configuration options or `gcloud run deploy` command flags should be specified to achieve this outcome?
- Specify the `--port=8000` flag during deployment to direct Cloud Run traffic to the container's listening port.Answer
- Include the `--allow-unauthenticated` flag during the deployment command.Answer
- COmit port deployment flags and hardcode the container application to ignore the `PORT` environment variable.
- DGrant the primitive `roles/owner` role to `allUsers` at the GCP project level.
Answer
The correct choices are specifying the `--port=8000` flag during deployment and including the `--allow-unauthenticated` flag in the deployment command.
To successfully deploy a container listening on port 8000 and make it publicly reachable, Cloud Run requires configuring the target port via `--port=8000` and permitting public access via `--allow-unauthenticated`.
Step-by-Step Solution
Key Concept
Cloud Run deployment configuration flags for custom container port binding and IAM public ingress access control.