<p>I have a cluster of Kubernetes with two web apps deployed , I can't understand the way of assign same port 80 and 443 for this apps for access everyone with you own domain, web1.com and web2.com redirects to specific service.
Looking in the web i found topics like a : Ingress Controller with Nginx Proxy reverse and traefik for manage request and route.</p>

<p>How can I do this?</p>

<p>Thank you</p>

<p>I will assume you already have 2 <code>Service</code>s defined for your apps (<code>s1</code> and <code>s2</code> below).</p>

<p>Kubernetes <code>Ingress</code> supports <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#name-based-virtual-hosting" rel="nofollow noreferrer">named based virtual hosting</a> (and much more):</p>

<blockquote>
  <p>The following Ingress tells the backing loadbalancer to route requests based on the Host header.</p>
</blockquote>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test
spec:
  rules:
  - host: foo.bar.com
    http:
      paths:
      - backend:
          serviceName: s1
          servicePort: 80
  - host: bar.foo.com
    http:
      paths:
      - backend:
          serviceName: s2
          servicePort: 80
</code></pre>
