Kubernetes node behind the NAT

5/8/2019
 Network1               Network2
(MASER, NODE1) <=NAT=> (NODE2, NODE3)

Is it possible to make overlay network work on nodes behind the NAT (without real IP addresses)? If so, how to do it?

-- Jonas
flannel
kubernetes
nat

1 Answer

5/9/2019

First of all this might not be good idea, as Kubernetes needs a stable networking between master(s) and nodes or you might get into multiple problems. Not sure if this will work in your case but you could look at federation between clusters.

Also I'm pretty sure here is the answer:

Kubernetes imposes the following fundamental requirements on any networking implementation (barring any intentional network segmentation policies):

  • all containers can communicate with all other containers without NAT
  • all nodes can communicate with all containers (and vice-versa) without NAT
  • the IP that a container sees itself as is the same IP that others see it as
-- aurelius
Source: StackOverflow