this post will be more like a reminder for my future self, when I’m about to install Rancher for the 10th time in a row on a given day and it’s driving me crazy about networking.
I’m using a Wireguard VPN to connect multiple kubernetes nodes together to have an internal network since they’re spread across different cloud providers or they’re with a provider who claims to be cloud native but doesn’t know about the concept of a VPC.
Unfortunately, the rancher installer is quite annoying and super complicated to use. The documentation isn’t helpful either since there’s not even a simple way documented which product one should use. Rancher offers: rancher, k3s, rke, rke2, rancherd. what the…?! anyway, let’s assume you’ve got the rancher webinterface somehow installed and are about to add a new cluster
do all your edits, put in the cluster name, configure the ingress, etc., but before you save anything click the tiny little Edit as YAML button
when you’re in there, look for the
network: part, there, change things (there are also examples) to use the
wg0 device for networking (if wg0 is your network device you set up with wireguard).
network: canal_network_provider: iface: "wg0" options: flannel_backend_type: "vxlan" plugin: "canal"