k3s-io / k3s

Lightweight Kubernetes
https://k3s.io
Apache License 2.0
27.1k stars 2.28k forks source link

rootless does not bind UDP ports #3333

Open smndtrl opened 3 years ago

smndtrl commented 3 years ago

Environmental Info: K3s Version: any

Node(s) CPU architecture, OS, and Version: any

Cluster Configuration: any

Describe the bug: rootlessports explicitly only allows TCP. Is there a special reason for it? https://github.com/k3s-io/k3s/blob/fd4d226e3debce314f1661359e077633fee8d8fb/pkg/rootlessports/controller.go#L141

Steps To Reproduce:

Expected behavior: UDP port bound to k3s-server

Actual behavior: UDP ports are ignored

Additional context / logs:

brandond commented 3 years ago

@AkihiroSuda might have some background on this?

AkihiroSuda commented 3 years ago

I'm not sure, but UDP forwarder might not be stable as TCP forwarder, so it was skipped in k3s controller? cc @ibuildthecloud

caroline-suse-rancher commented 1 year ago

@brandond Was this a part of your recent changes in rootless issues?

brandond commented 1 year ago

It looks like udp should work with both of the port drivers (child and slirp4netns), but we still need to add some additional bits to handle it properly on our side. We can keep this in the backlog as an enhancement request; if anyone is using rootless and needs UDP support a PR would be welcome.