It’s quite difficult to set & no precise document to follow. However here it is
1. install ingress-nginx
2. patch controller deployment & service
3. register TCP configmap
- create your deployment
- create your service
- check TCP connection (UDP is same with word changing)
Exposing TCP and UDP services - NGINX Ingress Controller
Ingress does not support TCP or UDP services. For this reason this Ingress controller uses the flags --tcp-services-configmap and --udp-services-configmap to point to an existing config map where the key is the external port to use and the value indicates the service to expose using the format: : :[PROXY]:[PROXY] It is also possible to use a number or the name of the port.
https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/
