How do I deploy a GRPC server and client on Google Cloud Platform?

8/31/2018

I'm kind of a newbie at using GCP/Kubernetes. I want to deploy both a GRPC service and a client to GCP.

I have read a lot about it and have tried several things. There's something on cloud endpoints where you compile your proto file and do an api.config.yaml. (https://cloud.google.com/endpoints/docs/grpc/get-started-grpc-kubernetes-engine)

That's not what I'm trying to do. I want to upload a GRPC service with it's .proto and expose its HTTP/2 public IP address and port. Then, deploy a GRPC client that interacts with that address and exposes REST endpoints.

How can I get this done?

-- Chidi Williams
google-cloud-platform
google-kubernetes-engine
grpc
grpc-node
kubernetes

1 Answer

8/31/2018

To deploy a grpc application to GKE/Kubernetes:

  1. Learn about gRPC, follow one of the quickstarts at https://grpc.io/docs/quickstart/
  2. Learn about how to build Docker images for your application.
  3. Once you have a Docker image, follow https://cloud.google.com/kubernetes-engine/docs/tutorials/hello-app tutorial to learn how to:
    • push a container image to Google Container Registry
    • create a GKE cluster
    • deploy the container image
    • expose it on public internet on an IP address.

These should be good to start with.

Note that gRPC apps aren't much different than just HTTP web server apps. As far as Kubernetes is concerned, they're just a container image with a port number. :)

-- AhmetB - Google
Source: StackOverflow