Initial Configuration
Several steps must be carried out to prepare the server for K8s deployment.
At the time of this writing there is a known issue with RKE2 requiring a custom configuration for NetworkManager. The following procedure will overcome this limitation.
# cat >> /etc/NetworkManager/conf.d/rke2-canal.conf <<EOF
[keyfile]
unmanaged-devices=interface-name:flannel*;interface-name:cali*;interface-name:tunl*;interface-name:vxlan.calico;interface-name:vxlan-v6.calico;interface-name:wireguard.cali;interface-name:wg-v6.cali
EOF
# systemctl reload NetworkManagerBecause of another known issue/limitation, it is also necessary to disable the firewall at this time.
Firewalld conflicts with RKE2’s default Canal (Calico + Flannel) networking stack. To avoid unexpected behavior, firewalld should be disabled on systems running RKE2.
# systemctl disable --now firewalldYou may need to increase the max_user_instances for inotify. This is easy to do.
# echo "fs.inotify.max_user_instances=8192" >>/etc/sysctl.d/99-inotify.conf
# sysctl -p /etc/sysctl.d/99-inotify.confOnce this initial configuration has been completed you are ready to install RKE2 on your server!
It is recommended to disable swapping on rke2 nodes. This can be done as shown below. Note that the systemctl command may fail harmlessly if ‘swap.target’ does not exist on your system.
# swapoff -a
# systemctl disable --now swap.target
# sed -i.bak '/swap/d' /etc/fstab