<p>Is it possible to define ingresses such that it point to different namespaces.</p>
<p>e.g.
Same application running for different customers.
Namespaces - Customer1, Customer2</p>
<p>Both have the same apis - /api/v1/images/</p>
<p>Both are hosted on same cluster - api-dev</p>
<p>Now can we direct traffic to different namespaces depending on the name of customer in the api
e.g</p>
<p>Customer1/api/v1/images/- will show images stored in Customer1 namespace</p>
<p>Customer2/api/v1/images/- will show images stored in Customer2 namespace</p>
<p>The Customer name will be provided by another service running in default namespace</p>
<p><a href="https://i.stack.imgur.com/2pXdW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2pXdW.png" alt="enter image description here" /></a></p>

ankitj
<p>There are several ways to do this:</p>
<ol>
<li><p>You can create a DNS entry per <code>Service</code> in each namespace and have each namespace have its own LoadBalancer (perhaps costly but each app can be independently scaled etc)</p>
</li>
<li><p>You can use Istio and create a single <code>Gateway</code> and create a <code>VirtualServices</code> to each <code>Namespace</code>. This allows one DNS to your cluster and Istio can redirect traffic to each namespace without having to update the cluster DNS</p>
</li>
<li><p>You can write a short CodeZero provisioner for your app (<a href="https://github.com/c6o/provisioners" rel="nofollow noreferrer">https://github.com/c6o/provisioners</a>) and CodeZero will automatically do the DNS/ingress for each app instance in each namespace. You can test this out using an existing app</p>
</li>
</ol>
