<p>I'm pretty new to K8s in general and I'm a developer not exactly a network guy so I would like some ideas on how to reach my goal so I could research a bit on it.</p>
<p>Let's say I have my app (hosted on k8s), let's say myapp.domain.com.
Let's imagine I have a new customer, they want their own URL... let's say backoffice.company.com. For this to work I would have to go into my k8's ingress and add &quot;backoffice.company.com&quot; to the hosts.
Now let's imagine I have... 30000 customers doing this........... okay u get the point.</p>
<p>One idea that came to my mind was to use an external nginx for example which listens to all servernames and just proxies them to &quot;myapp.domain.com&quot;. But this forces me to have an extra server just to serve as proxy :/</p>
<p>Is there a way, maybe via TXT records or something like that to make the ingress verify that the request is to 'myapp'?</p>
<p>Thanks</p>

Joaogl
<p>You may expose service directly to clients using Load Balancer and add wildcard dns CNAME record <code>*.company.com</code> pointing to Load Balancer. In that case you don't need Nginx Ingress which reduces latency for your clients and removes one possible bottleneck.</p>
<p>If you still want Nginx Ingress then you may use <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#hostname-wildcards" rel="nofollow noreferrer">hostname wildcards</a> like this:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-wildcard-host
spec:
  rules:
  - host: &quot;*.foo.com&quot;
    http:
      paths:
      - pathType: Prefix
        path: &quot;/foo&quot;
        backend:
          service:
            name: service2
            port:
              number: 80
</code></pre>
