Bind IP (GKE LoadBalancer IP) to Google Cloud Endpoint

2/19/2020

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
google-cloud-endpoints
google-cloud-endpoints-v2
google-kubernetes-engine
ip

0 Answers