<p>I've gotten up Traefik as an Ingress in Kubernetes with this configuration: <a href="https://github.com/RedxLus/traefik-simple-kubernetes/tree/master/V1.7" rel="nofollow noreferrer">https://github.com/RedxLus/traefik-simple-kubernetes/tree/master/V1.7</a></p>

<p>And works well to HTTP and HTTPS but I don't know how can open others ports to forward, for example, a Pod with an Ingress with MySQL in port 3306</p>

<p>Thanks for every answer!</p>

redxlus
<p>Traefik doesn't support it if you are using an Ingress resource and that resource doesn't support L4 type of traffic like mentioned in the other answer.</p>

<p>But if you are using an Nginx ingress controller there is a workaround, use a ConfigMap with the ingress controller options <code>--tcp-services-configmap</code> and <code>--udp-services-configmap</code> as described <a href="https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/" rel="nofollow noreferrer">here</a>. Then your <code>tcp-services</code> ConfigMap would look something like this:</p>

<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: tcp-services
  namespace: ingress-nginx
data:
  9000: "default/example-go:8080"
</code></pre>

<p>The advantage of this is having a single entry point to your cluster (this applies to any ingress that would be used for TCP/UDP) but the downside is overhead of having an extra layer compared to just simply having a Kubernetes <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">Service</a> (NodePort or LoadBalancer) that already listens on TCP/UDP ports.</p>
