2

I have a simple question but struggling on it (For a while now, following a lot of Google Tutorials tho..).


Context:

I have a GKE (Google Kubernetes Engine) cluster which has workloads (Load Balancers, Pods, etc)

I have a LoadBalancer for ServiceA which has an external IP XX.XXX.XXX.XX. This service is exposing port YYYY. I can then connect to my service using this IP:PORT combination.


Problem: How can I access this XX.XXX.XXX.XX:YYYY from an address such as <YOUR_NAMING>.endpoints.<PROJECT_ID>.cloud.goog?

Possible example:

We have a service running a gRPC server (:9000) and a REST API (:9001)

  • service-a.endpoints.emixam23.cloud.goog: (A request to this endpoint [HTTP] would forward it to XX.XXX.XXX.XX:9001, as well as a gRPC connection could be forwarded to XX.XXX.XXX.XX:9000 depending on the configuration)
  • service-a.endpoints.emixam23.cloud.goog:9001: (A request to this endpoint [HTTP] would forward it to XX.XXX.XXX.XX:9001 and only)
  • service-a.endpoints.emixam23.cloud.goog:9000: (A connection to this endpoint [gRPC] would be forwarded to XX.XXX.XXX.XX:9000 and only)

Thanks for any help!

Emixam23
  • 3,236
  • 5
  • 35
  • 83
  • I'm not super clear on how the Google endpoints are configured but can say that you can configure a service type LoadBalancer t expose those two ports. As long as the endpoint can forward traffic to the LB IP:Port, this should work. What is the problem you are running into? – Patrick W Feb 20 '20 at 03:44
  • My issue is that I followed all their tutorial and it never works.. only one time I got something as a Swagger page but it’s not at all what I try to do. Do you have any WORKING solution to achieve it? Any helpful link? Thanks ! – Emixam23 Feb 20 '20 at 04:04
  • Could you specify which tutorial you followed and never work? I want test it in my end. – Hao Z Feb 20 '20 at 04:15
  • https://cloud.google.com/endpoints/docs/grpc/get-started-kubernetes-engine was on of them, https://medium.com/google-cloud/exploring-grpc-on-google-cloud-platform-82531b4b82b7 also – Emixam23 Feb 20 '20 at 04:44
  • Which step was you stuck in [cloud.google.com/endpoints/docs/grpc/…](https://cloud.google.com/endpoints/docs/grpc/get-started-kubernetes-engine)? I tried it in my testing environment without issue. – Hao Z Feb 21 '20 at 03:31
  • Wow, but can you share the final proto file you have and the 2 yaml files you have – Emixam23 Feb 21 '20 at 05:23
  • I think he is using the ones from the guide he shared. I would say that you should try them and confirm if they work for you. – rsalinas Feb 24 '20 at 10:51

0 Answers0