<div dir="ltr"><div>Hi,</div><div><br></div><div>I am trying to build an encrypted tunnel between two Kubernetes clusters.</div><div>The distribution of Kubernetes that I use is OpenShift, so I'll make my examples in OpenShift although the problem that I'm seeing is really more general.</div><div><br></div><div>The nodes that comprise the cluster in OpenShift have an IP in what we'll call the enterprise network. Also they establish between each other an SDN. The SDN will have a separate CIDR from the enterprise network and the pods that OpenShift starts receive an SDN IP. Each node manages a subnet of the SDN CIDR.</div><div><br></div><div>What I'd like to do is to make the IPs of two different OpenShift SDNs routable over and encrypted tunnel.</div><div><br></div><div>In my design each node of cluster A sees as its VPN peers the nodes of cluster B. So this creates a sort of a meshed VPN. </div><div><br></div><div>Wireguard fits very well this series of requirements, but I have an issue.</div><div><br></div><div>Normally the nodes of a cluster are not directly exposed to the internet. This is for security reasons. Whether the cluster is in the cloud or on premise, normally what customers do is to use private internal addresses. To access the cluster one can use VIPs. Especially in the cloud Kubernetes makes it easy to create VIPs in an automated fashion. VIP are public IPs that can be used to loadbalanced backed services. UDP VIPS are supported.</div><div><br></div><div>So if we assume that the two clusters that we want to connect using wireguard are in two different geographies and can only be talk over the internet and through VIPs, then the IP that a  node uses for its outbound connection is not the same that its peer need to use for its inbound connections. </div><div><br></div><div>Each node can have a dedicated VIP that peers need to use for its inbound connection and then it will use the node's private IP for its outbound connection.</div><div><br></div><div>In this situation wiregaurd assumes that the peer has changed IP (built-in roaming feature) and it updates the peer endpoint value. This doesn't work for my setup.</div><div><br></div><div>What can I do to fix this issue?</div><div>Or alternatively would it be reasonable to add a flag to make a peer configuration immutable?</div><div><br></div><div><br></div><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Thanks,<div>Raffaele</div><div><br></div><div>Raffaele Spazzoli</div><div>Senior Architect - <a href="https://www.openshift.com" target="_blank">OpenShift</a>, <a href="https://www.redhat.com/en/services/consulting/paas" target="_blank">Containers and PaaS Practice</a></div><div>Tel: +1 216-258-7717</div><div><br></div><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>