Running k3s on with pi zero

1/8/2021

when using k3sup to setup k3s with raspbian buster on raspberrypi 4b it works (armv7 architecture; with reference below). with an exact similar similar setup procedure of agent nodes on pi zeros, and running raspi-config, it errors with the following failures:

- CONFIG_CGROUP_CPUACCT: enabled
- CONFIG_CGROUP_DEVICE: enabled
- CONFIG_CGROUP_FREEZER: enabled
- CONFIG_CGROUP_SCHED: enabled
- CONFIG_CPUSETS: missing (fail)
- CONFIG_MEMCG: enabled
- CONFIG_KEYS: enabled
- CONFIG_VETH: enabled (as module)

a possible explanation may be that zeros are using armv6 architecture which have some reports mentioning that they may not be supported. There are also conflicting reports that it has been made possible to run on pi zeros.

~excerpt from : https://groups.google.com/g/clusterhat/c/iUcfVqJ1aL0

pi@cnat:~ $ kubectl get node -o wide          
NAME   STATUS   ROLES    AGE     VERSION        INTERNAL-IP     EXTERNAL-IP   OS-IMAGE                         KERNEL-VERSION   CONTAINER-RUNTIME
p4     Ready    <none>   20m     v1.17.2+k3s1   172.19.181.4    <none>        Raspbian GNU/Linux 10 (buster)   4.19.97+         containerd://1.3.3-k3s1
p2     Ready    <none>   5m46s   v1.17.2+k3s1   172.19.181.2    <none>        Raspbian GNU/Linux 10 (buster)   4.19.97+         containerd://1.3.3-k3s1
p1     Ready    <none>   12m     v1.17.2+k3s1   172.19.181.1    <none>        Raspbian GNU/Linux 10 (buster)   4.19.97+         containerd://1.3.3-k3s1
cnat   Ready    master   31m     v1.17.2+k3s1   192.168.5.234   <none>        Raspbian GNU/Linux 10 (buster)   4.19.97-v7+      containerd://1.3.3-k3s1
p3     Ready    <none>   114s    v1.17.2+k3s1   172.19.181.3    <none>        Raspbian GNU/Linux 10 (buster)   4.19.97+         containerd://1.3.3-k3s1

Is there any configuration or that will enable k3s (agent) to successfully operate on raspberry pi zero (w)? If so what is the node os/version and k3s setup for this? Any help appreciated as this has been some uphill battle.

(following reference : https://alexellisuk.medium.com/walk-through-install-kubernetes-to-your-raspberry-pi-in-15-minutes-84a8492dc95a )

-- mirageglobe
cluster-computing
k3s
kubernetes
raspberry-pi
raspbian

2 Answers

5/24/2021

Unfortunately, k3s can't run on Pi Zero because Pi zero is based on ARMv6 and K3S only support ARM starting ARMv7. (see this Github issue : https://github.com/k3s-io/k3s/issues/2699).

If you want a Raspberry Pi to run K3s, use a Raspberry Pi with an ARMv7 CPU (Ex : Raspberry pi 4).

-- Camille Gerin-Roze
Source: StackOverflow

2/11/2021

In order to get past the errors you are seeing on the pi zero devices, I added the following to the /boot/cmdline.txt line "cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory".

However after starting and running a short while the k3s agent service will cord dump.

-- Que
Source: StackOverflow