Google Cloud Run and gRPC

Bhargav Shah
2 min readMar 27, 2020

--

Google Cloud Run support unary gRPC

Google Cloud Run + gRPC

Google Cloud Run has recently started supporting gRPC. In this blog, we are going to release our first container on Cloud Run which use gRPC.

Before start, If you don’t know about “Google Cloud Run” or “gRPC” then please refer following blogs.

We are going to use image “bhargavshah86/grpc-cloud-run-example:latest” which I have build and already present DockerHub for your use.

Hands-on 💻

  1. Log into “Google Cloud Platform” account.
  2. Open “Cloud Shell”

3. Pull our sample application from Docker Hub and push same image into Google Container Registry (GCR)

# Pull image from Docker Hub
docker pull bhargavshah86/grpc-cloud-run-example:latest
# TAG image for GCR
docker image tag bhargavshah86/grpc-cloud-run-example:latest asia.gcr.io/[PROJECT-ID]/grpc-cloud-run-example:latest
# Push image into GCR
docker push asia.gcr.io/[PROJECT-ID]/grpc-cloud-run-example:latest

4. Go to “Cloud Run” and Create Service.

5. Click Create to deploy the image to Cloud Run and wait for the deployment to finish.

Hurray!! We have released our gRPC service on Cloud Run.

Let’s test this — No we can not use our favorite “curl”. We need tool called “grpcurl” or “BloomRPC”.

  1. Using BloomRPC :
grpc-cloud-run-example-w5pukseneq-an.a.run.app:443

2. Using grpcurl cli

Thank you for reading 😎

--

--

Bhargav Shah
Bhargav Shah

Written by Bhargav Shah

Cloud Solution Architect at Walmart Japan

No responses yet