How Can I Route Traffic to Different Kubernetes Clusters Using Gateway API?
Asked by
CuriousCoder99
I've set up two Kubernetes clusters with a Gateway API, and they share a common load balancer gateway. I'm trying to figure out how to route traffic so that abc.host.com goes to cluster A while def.host.com goes to cluster B. Additionally, I need users of cluster B to be able to add their own domain names (for example, otherhost.com) that aren't part of host.com, which I own. Our current setup includes a private DNS server that doesn't allow root alias and doesn't support automated DNS routing for clients.
Answers
You might want to confirm if both clusters need to be under the same domain. If they're separate, consider using a load balancer in front of them. This way, you can manage the traffic distribution easily. Alternatively, you could use a cloud service like Cloudflare or Fastly and configure both clusters as upstream servers.
Reply to this answer
Add your answer
Answers are reviewed before publication.
CuriousCoder99: Thanks for the tip! I've updated my question with more details.