<p>Hello I would like to know how to dynamically route multiple domains to different services in Kubernetes, I'm trying to let my users add a domain to their accounts and based on that domain route to a specific service to render their webpage but with their domain. I have no idea where to start and would like to know if this is possible with Kubernetes.</p>

nysertxs
<p>Since you have tagged the question with google cloud my answer is geared towards google cloud.</p>

<p>For HTTP/HTTPS type traffic you can create an ingress resource and the ingress controller(nginx or GKE ingress) will create a HTTP Loadbalancer in google cloud. Then you can provision a static IP to the load balancer. Finally you can configure your domain in DNS to route traffic to that static IP whenever an user hits your domain.</p>

<p><a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/http-balancer" rel="nofollow noreferrer">Guide</a> on how to create ingress and provision static IP.</p>

<p><a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/http-balancer" rel="nofollow noreferrer">Guide</a> on configuring domain names with static IP.</p>

<p>Full <a href="https://cloud.google.com/community/tutorials/nginx-ingress-gke" rel="nofollow noreferrer">guide</a> on using nginx ingress controller in google cloud.</p>

<p>Here is the architecture of above nginx guide.</p>

<p><a href="https://i.stack.imgur.com/Q0aQw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q0aQw.png" alt="enter image description here"></a></p>

<p>For multi domain use case you just extend the above and configure different domains using the same construct.</p>
