I have been studying how kubernetes pod communication works across nodes and here is my intake so far:
Basically, the following figure describes. how each pod has network interface eth0 that is linked to the veth and than bridged to the hosts eth0 interface.
One way to make cross node communication between pods is by configuring routing tables accordingly.
let's say Node A has address domain 10.1.1.0/24 and Node B has address domain 10.1.2.0/24.
I can configure routing tables on node A to forward traffic for 10.1.2.0/24 to 10.100.0.2(eth0 of node B), and similar for node B to forward traffic for 10.1.1.0/24 to 10.100.0.1 (eth0 of node A)
This can work if my nodes aren't seperated by routers or if the routers are configured accordingly because they will otherwise drop packets that have private ip address as destination, This is isn't practical!
And here we get to talk about SDN which I am not clear about and is apparently the solution. As far as I know the SDN encapsulates packets to set a routable source and destination Ips
So basically to deploy A Container network plugin on kubernetes which creates an SDN, you basically create daemon sets and other assisting kubernetes objects.
My question is:
How do those daemon sets replace the routing tables modifications and make sure pods can communicate across nodes?
How do daemon sets which are also pods, influence the network and other pods which have different namespaces?