Lesson 59 of 60 · Go
Deploying a gRPC Service on Google Cloud Run
Duration: 20 minutes
Cloud Run for gRPC
This lesson explains the main concept clearly with beginner-friendly examples and background so you can learn why the code works.
- Dockerfile (same as lesson‑47) – expose port
8080. - Build and push the image.
$ docker build -t gcr.io/<PROJECT>/go-grpc .
$ docker push gcr.io/<PROJECT>/go-grpc
- Deploy with the gcloud CLI:
$ gcloud run deploy go-grpc \
--image gcr.io/<PROJECT>/go-grpc \
--platform managed \
--region us-central1 \
--allow-unauthenticated \
--port 8080
- Enable gRPC in the service settings (check Allow unauthenticated invocations and gRPC protocol).
- Use the generated client to call the endpoint (ensure
grpc.WithTransportCredentials(insecure.NewCredentials())).