title: kubernetes expose services with Traefik 2.x as ingress with CRD
body: <h1>What do i have working</h1>
  
  <p>I have a Kubernetes cluster as follow:</p>
  
  <ul>
  <li>Single control plane (but plan to extend to 3 control plane for HA)</li>
  <li>2 worker nodes</li>
  </ul>
  
  <p><br><br>
  On this cluster i deployed (following this doc from traefik <a href="https://docs.traefik.io/user-guides/crd-acme/" rel="nofollow noreferrer">https://docs.traefik.io/user-guides/crd-acme/</a>):</p>
  
  <ul>
  <li><p>A deployment that create two pods :</p>
  
  <ul>
  <li>traefik itself: which will be in charge of routing with exposed port 80, 8080</li>
  <li>whoami:a simple http server thats responds to http requests</li>
  </ul></li>
  <li><p>two services</p>
  
  <ul>
  <li>traefik service: <a href="https://i.stack.imgur.com/U1Zub.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U1Zub.png" alt=""></a></li>
  <li>whoami servic: <a href="https://i.stack.imgur.com/hoIQt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hoIQt.png" alt=""></a></li>
  </ul></li>
  <li><p>One traefik IngressRoute:
  <a href="https://i.stack.imgur.com/x5OIW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x5OIW.png" alt=""></a></p></li>
  </ul>
  
  <h1>What do i want</h1>
  
  <p>I have multiple services running in the cluster and i want to expose them to the outside using Ingress.
  More precisely i want to use the new <strong>Traefik 2.x</strong> CDR ingress methods.</p>
  
  <p>My ultimate goal is to use new traefiks 2.x CRD to expose resources on port 80, 443, 8080 using <code>IngressRoute</code> Custom resource definitions</p>
  
  <h1>What's the problem</h1>
  
  <p>If i understand well, classic Ingress controllers allow exposition of every ports we want to the outside world (including 80, 8080 and 443).</p>
  
  <p>But with the new traefik CDR ingress approach on it's own it does not exports anything at all.
  One solution is to define the Traefik service as a loadbalancer typed service and then expose some ports. But you are forced to use the 30000-32767 ports range (same as nodeport), and i don't want to add a reverse proxy in front of the reverse proxy to be able to expose port 80 and 443...</p>
  
  <p>Also i've seed from the doc of the new igress CRD (<a href="https://docs.traefik.io/user-guides/crd-acme/" rel="nofollow noreferrer">https://docs.traefik.io/user-guides/crd-acme/</a>) that:</p>
  
  <p><code>kubectl port-forward --address 0.0.0.0 service/traefik 8000:8000 8080:8080 443:4443 -n default</code></p>
  
  <p>is required, and i understand that now. You need to map the host port to the service port.
  But mapping the ports that way feels clunky and counter intuitive. I don't want to have a part of the service description in a yaml and at the same time have to remember that i need to map port with <code>kubectl</code>.</p>
  
  <p>I'm pretty sure there is a neat and simple solution to this problem, but i can't understand how to keep things simple. Do you guys have an experience in kubernetes with the new traefik 2.x CRD config?</p>