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=10.1.50.0/24
static routers=10.1.50.1
static domain_name_servers=10.1.20.2

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
10.1.50.21      pi-k8s-01
10.1.50.22      pi-k8s-02
10.1.50.23      pi-k8s-03
10.1.50.24      pi-k8s-04
10.1.50.25      pi-k8s-05
10.1.50.26      pi-k8s-06

Reboot the pis

sudo reboot

Installing k3s without servicelb or traefik

curl -sfL https://get.k3s.io | 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 https://get.k3s.io | 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