1
votes

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?

1
I did the same thing several months ago. I have 3 projects in github grpc server (github.com/balchua/grpc), grpcdomain (github.com/balchua/grpcdomain) containing only the proto and then the code gen. And finally the demo (github.com/balchua/demo) where it exposes some web pagr and communicates with the grpc server. All samples comes with the kube manifests. If you're interested you can check it out. Unfortunately i dont have documentations and its in java only.Bal Chua

1 Answers

3
votes

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. :)