I have a Raspberry pi cluster which is built using kubeadm.
master : 10.42.0.159
worker node : 10.42.0.192
I want to expose a pod which is running on the worker node, using a service of type=nodeport with the nodePort 30101. Now I can do curl 10.42.0.159:30101
or curl 10.42.0.192:30101
on both master and worker node. But when I try to curl the same on other machines sitting on a different network, such as 10.10.14.67
, it fails.
I have set the iptables of both master and worker to accept any forward. My question is how to access the pod using NodeID:Nodeport from a different network?
For access from a different network, you must have a route between your networks. When you have the route, you will have the possibility to request your nodes. You need to configure it on your router.