<p>Our services use a K8s service with a reverse proxy to receive a request by multiple domains and redirect to our services, additionally, we manage SSL certificates powered by let's encrypt for every user that configures their domain in our service. Resuming I have multiple .conf files in the <strong>nginx</strong> for every domain that is configured. Works really great.</p>
<p>But now we need to increase our levels of security and availability and now we ready to configure the ingress in K8s to handle this problem for us because they are built for it.</p>
<p>Everything looks fine until we discover that every time that I need to configure a new domain as a host in the ingress I need to alter the config file and re-apply.</p>
<p>So that's the problem, I want to apply the same concept that I already have running, but in the nginx ingress controller. It's that possible? I have more than 10k domains up and running, I can't configure all in my ingress resource file.</p>
<p>Any thoughts?</p>

<p>In terms of scaling Kubernetes 10k domains should be fine to be configured in an Ingress resource. You might want to check how much storage you have in the etcd nodes to make sure you can store enough data there.</p>
<p>The default etcd storage is <a href="https://etcd.io/docs/v3.3.12/dev-guide/limit/#:%7E:text=The%20default%20storage%20size%20limit,the%20configured%20value%20exceeds%20it." rel="nofollow noreferrer">2Gb</a>, but if you keep increasing it's something to keep in mind.</p>
<p>You can also refer to the K8s <a href="https://kubernetes.io/docs/setup/best-practices/cluster-large/" rel="nofollow noreferrer">best practices</a> when it comes to building large clusters.</p>
<p>Another practice that you can use is to use <code>apply</code> and not <code>create</code> when changing the ingress resource, that way the changes are incremental. Furthermore, if you are using K8s 1.18 or later you can take advantage of <a href="https://kubernetes.io/blog/2020/04/01/kubernetes-1.18-feature-server-side-apply-beta-2/" rel="nofollow noreferrer">Server Side Apply</a>.</p>
