k3s on Raspberry Pi 4 Model B With 8GB

This is to be updated with more details

Network Switch

There are the IPs assigned to by Raspberry PIs. I think they are being assigned somehow to the same Pi

everytime. I have to explore how to fix them so that they are static always.

Setup Password-less SSH

pi@raspberrypi:~ $ mkdir ~/.ssh
pi@raspberrypi:~ $  touch ~/.ssh/authorized_keys
pi@raspberrypi:~ $  chmod 0700 ~/.ssh
pi@raspberrypi:~ $  chmod 0600 ~/.ssh/authorized_keys
pi@raspberrypi:~ $ vi ~/.ssh/authorized_keys

Copied the contents of ~/.ssh/id_rsa.pub which I generated to the file ~/.ssh/authorized_keys of each PI.

pi@raspberrypi:~ $ sudo curl -sfL https://get.k3s.io | K3S_TOKEN="K10e9d200a500ad44ba0072af9ea9f38d19a40cfc4cfd96d753d01466c618007f8e::server:bb58186ddf5f34800004affa48c44a12" K3S_URL="" K3S_NODE_NAME="rpiworker3" sh -
[INFO]  Finding release for channel stable
[INFO]  Using v1.22.7+k3s1 as release
[INFO]  Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.22.7+k3s1/sha256sum-arm.txt
[INFO]  Skipping binary downloaded, installed k3s matches hash
[INFO]  Skipping installation of SELinux RPM
[INFO]  Skipping /usr/local/bin/kubectl symlink to k3s, already exists
[INFO]  Skipping /usr/local/bin/crictl symlink to k3s, already exists
[INFO]  Skipping /usr/local/bin/ctr symlink to k3s, already exists
[INFO]  Creating killall script /usr/local/bin/k3s-killall.sh
[INFO]  Creating uninstall script /usr/local/bin/k3s-agent-uninstall.sh
[INFO]  env: Creating environment file /etc/systemd/system/k3s-agent.service.env
[INFO]  systemd: Creating service file /etc/systemd/system/k3s-agent.service
[INFO]  systemd: Enabling k3s-agent unit
Created symlink /etc/systemd/system/multi-user.target.wants/k3s-agent.service → /etc/systemd/system/k3s-agent.service.
[INFO]  systemd: Starting k3s-agent
pi@raspberrypi:~ $ 

PI cluster with case

Master Node

pi@raspberrypi:~ $ sudo k3s kubectl get node
NAME          STATUS   ROLES                  AGE     VERSION
rpiworker1    Ready    <none>                 3d23h   v1.22.7+k3s1
rpiworker2    Ready    <none>                 45h     v1.22.7+k3s1
raspberrypi   Ready    control-plane,master   4d22h   v1.23.4+k3s1
rpiworker3    Ready    <none>                 67s     v1.22.7+k3s1

List from my Mac

anu@Aarushis-MacBook-Pro ~ % kubectl get pods --namespace kube-system --kubeconfig ~/.kube/config-berry-pi
NAME                                      READY   STATUS      RESTARTS       AGE
helm-install-traefik-crd-65xpk            0/1     Completed   0              5d23h
helm-install-traefik-74pkr                0/1     Completed   2              5d23h
local-path-provisioner-6c79684f77-tbcqt   1/1     Running     11 (13m ago)   5d23h
coredns-5789895cd-qrps6                   1/1     Running     8 (13m ago)    5d23h
svclb-traefik-cnlw6                       2/2     Running     16 (13m ago)   5d23h
svclb-traefik-8v7kl                       2/2     Running     12 (12m ago)   5d
traefik-58b759688b-x7j4d                  1/1     Running     8 (13m ago)    5d23h
svclb-traefik-dqrwb                       2/2     Running     8 (12m ago)    2d22h
metrics-server-7cd5fcb6b7-xz5jp           1/1     Running     11 (13m ago)   5d23h
svclb-traefik-dxhbx                       2/2     Running     2 (12m ago)    25h
anu@Aarushis-MacBook-Pro ~ %