-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question regarding used port #106
Comments
This is the streaming server that was added, it is binding to an empty "tcp" address (?) for some reason. https://github.com/Mirantis/cri-dockerd/blob/v0.2.5/streaming/server.go#L239 Originally, it came from here: But there are not many details. Taken from here: https://github.com/kubernetes/kubernetes/blob/v1.23.9/pkg/kubelet/cri/streaming/server.go |
This comment was marked as outdated.
This comment was marked as outdated.
Thanks for the information. Does this mean that if I want the streaming server to bind to another address I have to change the source code and then compile it? |
This comment was marked as outdated.
This comment was marked as outdated.
To give a little more information, the streaming server uses GRPC (streaming) for some portforwarding,
That commit was mostly "refactor", in the "don't import massive upstream k8s modules to get some
This is actually somewhat different, and it will only listen on If this is changed, it should still default to "all interfaces", and should be a slice of addresses to listen to instead. Prior to that, though, @SimonBosse is it actually not listening to |
For historical background, the implementation in the upstream codebase actually set this by calling a non-exported method. The initial handover from upstream was great, but a little raw, so we're implementing what's public from the CRI spec. At the time, listening to "all interfaces" seemed like an ok tradeoff in being a little less rigid, but it's unclear at the moment whether anyone's actually using that functionality. Hyrum's Law says that someone probably is, but we wouldn't know until it was changed. |
Mine was listening to all interfaces (*), including v6 (and localhost). Thanks for the clarification, it should be alright then ? |
That's my question for OP ;) It should be alright in the sense that all interfaces will also include localhost, so there's no need to explicit rebind there. But "listen to all addresses" is a safety valve which not everyone may want. Just from a basic server hardening perspective, may as well make which addresses configurable as part of #102, and change the default to |
Hardening was the reason why my question came up. My intention was to find a possibility to only bind it to localhost for security reasons. |
If I understand it right, there is no possibility to bind only to localhost at the moment without changing the source code, is this right? |
Well, I wasn't planning on releasing a |
Hi,
I am using cri-dockerd as CRI for kubernetes. I have set --container-runtime=remote --container-runtime-endpoint=unix:///var/run/cri-dockerd.sock as flags for kubelet. I have noticed that there is a port (>30000) used by cri-dockerd which is bound to 0.0.0.0 and I am asking me for what this port is used and if there is a possibility to bind it to localhost.
Thanks for you answer
The text was updated successfully, but these errors were encountered: