First of all, I’m going to use k3s which is the lightweight version k8s.
Prerequisite
To run k3s, memory and CPUset cgroup need to be enabled.
In my case, because I’m using Ubuntu, I have to add following to /boot/firmware/nobtcmd.txt
, for Raspbian, use /boot/cmdline.txt
.
|
|
Note:
- Append to the same line instead of adding a new line
- Do this to every Pi
Then, reboot.
Install k3s using k3sup
On your laptop, install k3sup and then use it to install k3s.
|
|
Note:
- the
<RPi-user>
needs to be able tosudo
without having to type password. Follow this guide to config. - k3sup uses ssh-key to remote login, if you don’t have key generated yet, follow this guide.
Join other Pi (nodes) to the cluster
This can be easily done with k3sup
|
|
Do this to every Pi you’d like to add to the cluster.
That’s it.
Upgrade Kubernetes master and nodes
Very simple, just rerun the install
and join
command with the same arguments/flags.