In this example, we use the following configuration
Install wireguard
Enable ip forwarding.
Generate public & private key for server, there will be privatekey and publickey file created.
add /etc/wireguard/wg0.conf
add /etc/wireguard/add-nat.sh
add /etc/wireguard/del-nat.sh
bring up wg0 interface, or do the second step if you want to startup on boot
sudo wg show
can see the connection
Install k3s
Wait till master is ready. To varify
or
Get k3s token, this will be used as client K3S_TOKEN
Install wireguard
Generate public & private key for server, there will be privatekey and publickey file created.
add /etc/wireguard/wg0.conf
bring up wg0 interface, or do the second step if you want to startup on boot
Verify
Cgroup enable. append following to /boot/cmdline.txt
then reboot
cat /proc/cgroups
to see if memory
exist
Install k3s
Wait till master is ready. To varify
or
In order to let kube-system local-path-provisioner working. Add
to the iptable and restart k3s.service
On Master Node Find the node kubectl get nodes
Drain it kubectl drain nodetoberemoved
Delete it kubectl delete node nodetoberemoved