Regarding exposing the workloads in GKE Private cluster

I have deployed my microservices/pods in a private GKE cluster and I want to expose my services to the end users outside the cluster. Basically my application will be having a domain name so how Can I expose my services to internet? I am thinking of using a load balancer with ingress rules to redirect the requests to the backend services. Can anyone help me with this approach or there are any other approaches?

Any supporting documentation/blog would be appreciated.

You are heading down the right path. I would use the Gateway API to create a load balancer. Since you want to use DNS, make sure you use a static IP with the Gateway. You’d then just create the A / Host record in your DNS servers.

Hi @garisingh Can I just use the HTTPS load balancer with host field and the following annotation kubernetes.io/ingress.class: “gce” in my ingress file? Then I will create a A record to map my load balancer’s public ip to my domain name. And to server requests through https I will create a kubernetes secret passing the certificates for my domain in the ingress rule itself. Does this approach work or should I use the gateway api? May the reason how using gateway api to create loadbalancer is benefical when compared to just creating ingress object? Any supporting documentation on using gateway api to expose kubernetes service would be helpful.

You can definitely use Ingress if you want, but the Gateway API is our strategic direction and IMHO is much better than the Ingress API. This is a good reference for deploying internal gateways, here’s the doc on static IPs with gateway, and finally here’s using secrets for TLS and/or using managed certificates (note that for internal gateways you’ll need to use a regional certificate). I’ve also created a bunch of examples as well.