I'm trying to figure out what's the best way to set up an internal load balancer on GCP from a GKE cluster, especially how to be able to register an internal domain name using it.
When the load balancer is created, its frontend contains no "service label" that would allow to reach the lb using a deterministic domain name. If I create manually a second frontend containing an arbitrary value for this field, I'm able to resolve the generated domain name on the lb IP, everything works fine... I just don't get how I can add this field from a k8s resource.
I checked ingress gce repo and the "FrontendConfig" CRD doesn't expose this field...
What would be the best way to get that ? Use the nginx-ingress-controller ? Set up external DNS to manage my own DNS zones ? something else ?
Best,
Matthieu
PS : also one "weird" thing is that, even if I created a dedicated "proxy-only subnet" in the same region, as asked in the documentation, the lb IPs are in the cluster subnet
Edit : actually, the IPs can't be in the proxy-only subnet. If you follow the accepted answer below, be sure to pick an IP from another subnet.