<p>I'm not sure if this is possible, I have looked around the web but couldn't find anything.</p>
<p>I running kubernetes and using NGINX ingress, I can do layer 7 routing, allowing me to use a single port for incoming requests, then based upon the request, route that request to different services.</p>
<p>My question is: Is there anything like that, that could do the same or a similar thing for TCP &amp; UDP ports?</p>
<p>e.g: So I can route traffic arriving at, lets say, TCP 9071 then route that traffic to different services based on some sort of flag/or traffic content.</p>
<p>It would be good to know if this is not possible as well?</p>

Choco
<p>You are not going to be able to route based on a URL because that's layer 7 HTTP(S). However, you can do TCP/UDP load balancing which is supported by most open source proxies.</p>
<ul>
<li><a href="https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/" rel="nofollow noreferrer">Nginx Ingress Controller TCP/UDP</a></li>
<li><a href="https://doc.traefik.io/traefik/routing/providers/kubernetes-crd/#kind-ingressroutetcp" rel="nofollow noreferrer">Traefik Ingress TCP/UDP</a></li>
<li><a href="https://haproxy-ingress.github.io/docs/configuration/command-line/#tcp-services-configmap" rel="nofollow noreferrer">HAproxy TCP</a></li>
</ul>
<p>✌️</p>
