what to do when the peers use different IPs to transmit and receive
rspazzol at redhat.com
Sun Sep 16 14:21:02 CEST 2018
I am trying to build an encrypted tunnel between two Kubernetes clusters.
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
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
What I'd like to do is to make the IPs of two different OpenShift SDNs
routable over and encrypted tunnel.
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.
Wireguard fits very well this series of requirements, but I have an issue.
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.
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
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
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.
What can I do to fix this issue?
Or alternatively would it be reasonable to add a flag to make a peer
Senior Architect - OpenShift <https://www.openshift.com>, Containers
and PaaS Practice <https://www.redhat.com/en/services/consulting/paas>
Tel: +1 216-258-7717
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the WireGuard