You are deploying a custom containerized HTTP web application to Google Cloud Run using the gcloud command line interface. Which TWO configurations or actions are required to ensure the service deploys successfully and receives HTTP traffic? (Select TWO.)
- Configure the web application inside the container to listen on the port defined by the PORT environment variable.Cevap
- Execute the gcloud run deploy command specifying the container image.Cevap
- CHardcode the application inside the container to listen exclusively on port 3000 regardless of environment variables.
- DGrant the primitive Owner role to end users so they have permission to send HTTP requests to the service.
Cevap
To successfully deploy and serve HTTP traffic on Cloud Run, the containerized application must listen on the port specified by the PORT environment variable, and the service must be deployed using the gcloud run deploy command.
Cloud Run injects the PORT environment variable into the container instance context (defaulting to 8080), which the web application must bind to for successful ingress traffic handling. Deploying the application is accomplished via the standard gcloud run deploy command.
Adım Adım Çözüm
Anahtar Kavram
Cloud Run Port Binding & Deployment Syntax