fujitatomoya / ros_k8s

Kuberenetes / ROS&ROS2 Cluster Samples
Creative Commons Attribution 4.0 International
185 stars 26 forks source link

Communicate problem when machine not in k8s cluster #29

Closed miracle-jia closed 1 year ago

miracle-jia commented 1 year ago

This repository is so greatful!

I have the following use case: my roscore is deployed in a k8s cluster, but developers need to debug locally due to certain algorithms. They need to register their local development machine with the roscore, but the development machine is not a node in the k8s cluster. We can discover the published topics between the development machine and the container using "rostopic list", and we can also echo messages from the development machine to the container using "rostopic echo". However, there is a problem echo messages from the container to the development machine. We register with the roscore using IP. We are using the Calico network for our cluster. Is there a solution or something we are doing wrong?

So far, we have only been able to workaround this issue by using the "host-network" mode, which, unfortunately, consumes a lot of host ports.

Anyone can help us? Thank you.

fujitatomoya commented 1 year ago

@miracle-jia thanks for creating issue.

They need to register their local development machine with the roscore, but the development machine is not a node in the k8s cluster.

i am not really sure what meant here.

can you describe the network configuration for the pods and host system?

basically, rosmaster provides XMLRPC server to share the configuration data such as api path and port numbers. that said, if it accesses to rosmaster, that means it can get the list topics and services, since those are just configuration data in the rosmaster. but the data path is different path, that is constructed with TCP/IP (default) or UDP/IP for each endpoint, that said endpoints should be able to ping each other in the network.

i guess in your case,

anyway i would like to have more detailed network configuration for entire cluster and host system.

fujitatomoya commented 1 year ago

@miracle-jia since there is no further update or information, i will go ahead to close this.