cloud-provider-kind icon indicating copy to clipboard operation
cloud-provider-kind copied to clipboard

Port Protocol UDP Support

Open skizot722 opened this issue 10 months ago • 4 comments

Hello! First of all, let me say amazing work on this project. I've set it up without issue and tested for some sample TCP services and it worked flawlessly. My actual use case for a local testing environment involves a UDP service port, and I figured out after a bit of digging that UDP is currently not supported. Are there any plans to support that in the near future? What are the limitations to allowing UDP right now in the proxy?

skizot722 avatar Apr 24 '24 20:04 skizot722

we are using haproxy as implementation of loadbalancer because we already use it in KIND, and it does not support UDP https://github.com/haproxy/haproxy/issues/62

We need to understand first if there are other LB we can use to replace haproxy, like envoy ... but that may take time ... not very top priority :(

aojea avatar Apr 24 '24 21:04 aojea

Thanks @aojea - that's an interesting thread.

skizot722 avatar Apr 24 '24 22:04 skizot722

The haproxy thread there suggests that nginx does UDP proxying for some value of UDP proxying, and it looks like ingress-nginx supports UDP Ingress, which suggests nginx's UDP support is good enough for what Kubernetes Services need.

danwinship avatar May 02 '24 13:05 danwinship

back when we discussed this in kind , several years ago , I've tried with envoy since also offers an API to control remotely and accepts UDP https://www.envoyproxy.io/docs/envoy/latest/start/sandboxes/udp ... it is also used widely for cloud providers as loadbalancers so it will provide the most realistic implementation

If I have time I will try to replace haproxy with envoy ... unless someone beats me 😄

aojea avatar May 02 '24 17:05 aojea

I've also added an example https://github.com/kubernetes-sigs/cloud-provider-kind/blob/main/examples/loadbalancer_udp_tcp.yaml so you can try it

aojea avatar May 04 '24 13:05 aojea

@aojea - wow, thank you so much for the work and lightning fast turnaround!

skizot722 avatar May 06 '24 01:05 skizot722