Google Cloud Run and gRPC
Google Cloud Run support unary 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 💻
- Log into “Google Cloud Platform” account.
- 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”.
- Using BloomRPC :
2. Using grpcurl cli
Thank you for reading 😎