# Turn on cluster nodes clusterctrl on # update master sudo apt update && sudo apt dist-upgrade -y # Add nodes to hosts file sudo vi /etc/hosts 172.19.181.1 p1 172.19.181.2 p2 172.19.181.3 p3 172.19.181.4 p4 # Upgrade nodes ssh p1 'sudo apt update && sudo apt dist-upgrade -y' ssh p2 'sudo apt update && sudo apt dist-upgrade -y' ssh p3 'sudo apt update && sudo apt dist-upgrade -y' ssh p4 'sudo apt update && sudo apt dist-upgrade -y' # enable memory cgroup on all raspberries sudo vi /boot/cmdline.txt cgroup_memory=1 cgroup_enable=memory # Download k3sup sudo curl -sLS https://get.k3sup.dev | sh sudo cp k3sup-arm64 /usr/local/bin/k3sup # Install k3sup without servicelb so we can use metalLB later k3sup install --ip 172.19.181.254 --user $(whoami) --ssh-key ~/.ssh/kubemaster --k3s-extra-args '--disable servicelb' # Copy config file to user sudo cp /etc/k3s/kubeconfig ~/.kube/ # Export the file export KUBECONFIG=~/.kube/kubeconfig # Install on nodes k3sup join --ip 172.19.181.1 --server-ip 172.19.181.254 --user $(whoami) --ssh-key ~/.ssh/kubemaster k3sup join --ip 172.19.181.2 --server-ip 172.19.181.254 --user $(whoami) --ssh-key ~/.ssh/kubemaster k3sup join --ip 172.19.181.3 --server-ip 172.19.181.254 --user $(whoami) --ssh-key ~/.ssh/kubemaster k3sup join --ip 172.19.181.4 --server-ip 172.19.181.254 --user $(whoami) --ssh-key ~/.ssh/kubemaster
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter