TCP ingress support in Kubernetes

11/5/2018

It seems to be TCP and UDP support is going to be deprecated in next version of ingress-nginx controller . Any other ingress controllers supports TCP and UDP ? or any other solutions for exposing non-http ports outside kubernetes ?

  • kubernetes beginner here *
-- Ebeid ElSayed
kubernetes
nginx
nginx-ingress

1 Answer

11/5/2018

The nginx-ingress (and the Ingress resource in K8s for that matter) is a layer 7 facility and doesn't support layer 4, in any case, layer 4 might be supported at some point in the future. Note that nginx itself supports layer 4 traffic but not the K8s Ingress.

If you like to directly terminate TCP or UDP you can use standard Kubernetes services. NodePort and LoadBalancer (depending on the cloud provider) types of services should also support TCP/UDP.

Update:

There's a tutorial on how to support TCP/UDP with an nginx ingress (from the NGINX company) here.

-- Rico
Source: StackOverflow