Skip to content
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

Access from pod to host os network #3496

Open
adrianatrevinoe opened this issue Feb 1, 2024 · 2 comments
Open

Access from pod to host os network #3496

adrianatrevinoe opened this issue Feb 1, 2024 · 2 comments
Labels
kind/support Categorizes issue or PR as a support question.

Comments

@adrianatrevinoe
Copy link

Hello!
I am using a docker image inside a kubernetes pod, all run with kind.
I am setting up several virtual can buses and sending traffic through them in my host os (ubuntu 20:04).
When I used just my docker image I ran docker run --network="host" and that created the "bridge" from my host os to the image, so if i went to my docker container and did ifconfig -a | grep can i could see the same virtual buses from my host os and my container set up.

I tried doing this with kubernetes by adding to my deployment yaml hostNetwork: true but the communication of the virtual buses is not being made inside my pod, what could I do for this?
Thank you!

@adrianatrevinoe adrianatrevinoe added the kind/support Categorizes issue or PR as a support question. label Feb 1, 2024
@BenTheElder
Copy link
Member

On linux with docker-ce (not docker desktop), kind will be on a bridge network named kind and you should be able to reach the node IPs from teh host, from the nodes you can then reach the pods.

Going the other direction you have to hit the node network's bridge IP or other non-local IPs since loopback is local to the nodes. The nodes are not on the host's network directly and we will not support that (it wouldn't work right for multiple clusters or nodes anyhow if they were in host net, you could run a single node by just using kubeadm init directly on the host instead).

@adrianatrevinoe
Copy link
Author

ok thankyou! so i just need to bridge my can bus messages to the specific ip for the pod? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

No branches or pull requests

2 participants