Step 1: Installing k3 - jonathank42/defconsandbox GitHub Wiki

Because these are pis, edit the following and add: cgroup_memory=1 cgroup_enable=memory

sudo nano /boot/cmdline.txt

Edit the following file to set the static ip

sudo nano /etc/dhcpcd.conf

Set the ip with the following template.

interface eth0
static ip_address=
static routers=
static domain_name_servers=

Set the hostname of the pis

sudo hostnamectl set-hostname pi-k8s-0

Update the pis

sudo apt update && sudo apt upgrade -y

Install dependencies needed

sudo apt install nfs-common open-iscsi -y

For sanity sake, set the hostnames and ips

sudo nano /etc/hosts      pi-k8s-01      pi-k8s-02      pi-k8s-03      pi-k8s-04      pi-k8s-05      pi-k8s-06

Reboot the pis

sudo reboot

Installing k3s without servicelb or traefik

curl -sfL | INSTALL_K3S_EXEC="server --disable traefik --disable servicelb"  sh -s -

To add worker nodes, you'll need the token from the controller

sudo k3s token create
sudo k3s token list

Take the token and your controller ip, fill out the following and run on each worker node

curl -sfL | K3S_URL=https://myserver:6443 K3S_TOKEN=mynodetoken sh -

Get the kubernetes config to put your daily driver to interact with the cluster

sudo cat /etc/rancher/k3s/k3s.yaml