UDP send and receive in kubernetes UDP send and receive in kubernetes kubernetes kubernetes

UDP send and receive in kubernetes


Actually, NodePort can be used to expose ports within TCP and UDP protocols. What was the problem in your case?

You can consider using Nginx Ingress Controller and creating ReplicationController to implement Nginx ingress in order to expose your Pods across UDP port as described Here or you can check this Link.

Create ConfigMap and specify External port like <namespace/service name>:<service port> which you want to access from outside Kubernetes cluster.

Finally, Nginx ingress can be exposed, i.e., using Kubernetes ExternalIP.


I am able to find the solution for my requirement.

I have exposed the UDP port for my pod and it works fine.

Example

kubectl expose pod udp-server-deployment-8c8d6d868-c77zx --port=10001 --protocol=UDP --external-ip=10.1.11.82 --name=udp-server

Thank you all for your support :)