<p>We're searching a way to use subdomains in a master-minion nginx ingress implementation. We've tried a lot of different approaches but we haven't got it. The documentation example works fine (<a href="https://github.com/nginxinc/kubernetes-ingress/tree/v1.8.1/examples/mergeable-ingress-types" rel="nofollow noreferrer">https://github.com/nginxinc/kubernetes-ingress/tree/v1.8.1/examples/mergeable-ingress-types</a>), but this example is with paths. Is there anyway to do it with subdomains or it's not possible?</p>
<p>I will have a different subdomain like the wordpress structure every time you create a new page, I would like to know what is the best way to do it.</p>
<p>Thank you very much!</p>

Pablo Alejandro
<p>The Nginx ingress controller documentation (<a href="https://kubernetes.github.io/ingress-nginx/user-guide/basic-usage/" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/user-guide/basic-usage/</a>) got a pretty simple example working with different hosts:</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: ingress-myservicea
  annotations:
    # use the shared ingress-nginx
    kubernetes.io/ingress.class: &quot;nginx&quot;
spec:
  rules:
  - host: myservicea.foo.org
    http:
      paths:
      - path: /
        backend:
          serviceName: myservicea
          servicePort: 80
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: ingress-myserviceb
  annotations:
    # use the shared ingress-nginx
    kubernetes.io/ingress.class: &quot;nginx&quot;
spec:
  rules:
  - host: myserviceb.foo.org
    http:
      paths:
      - path: /
        backend:
          serviceName: myserviceb
          servicePort: 80
</code></pre>
<p>What have you tried or trying to achieve that is not working ?</p>
