<p>I have below ingress-nginx configuration file.</p>
<p>It rewrites request for <code>one.example.com</code>. I have added another domain, but I don't want rewrite to happen for other domain.</p>
<p>I went through doc, but there is now rewrite example for multiple host setup.</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-service
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/use-regex: &quot;true&quot;
    nginx.ingress.kubernetes.io/rewrite-target: /$1
    certmanager.k8s.io/cluster-issuer: &quot;letsencrypt-example-prod&quot;
    nginx.ingress.kubernetes.io/ssl-redirect: &quot;true&quot;
spec:
  tls:
    - hosts:
        - one.example.com
        - two.example.com
      secretName: super-secret
  rules:
    - host: one.example.com
      http:
        paths:
          - path: /customer/?(.*)
            pathType: Prefix
            backend:
              service:
                name: customer-srv
                port:
                  number: 3000
      host: two.example.com
      http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service:
              name: kube-prometheus-grafana
              port:
                number: 80
</code></pre>
<p>I could create two separate ingress files for each host.</p>
<p>What will happen in that case it will create two load balancers with different dns?</p>
<p>(cluster is hosted on aws)</p>

<p>You can create two separate ingress.</p>
<p>In that case, nothing will change your ingress <strong>controller IP</strong> would be same only for DNS.</p>
<blockquote>
<p>What will happen in that case it will create two load balancers with
different dns?</p>
</blockquote>
<p>No, it won't create two load balancers.</p>
