问题
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 *
回答1:
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.
来源:https://stackoverflow.com/questions/53160747/tcp-ingress-support-in-kubernetes