Have been trying to run k3s on Raspberry Pi 3 Model B Rev 1.2 (BCM2835) but have been unsuccessful.
My OS:
Raspbian GNU/Linux 10 (buster)
Linux kube-master 5.4.51-v7+ #1327 SMP Thu Jul 23 10:58:46 BST 2020 armv7l GNU/Linux
level=info msg="Run: k3s kubectl"
Jul 26 06:34:05 kube-master k3s[943]: time="2020-07-26T06:34:05.256984297+01:00" level=info msg="k3s is up and running"
Jul 26 06:34:05 kube-master k3s[943]: time="2020-07-26T06:34:05.257725574+01:00" level=error msg="Failed to find memory cgroup, you may need to add \"cgroup_memory=1 cgroup_enable=memory\" to your linux cmdline (/boot/cmdline.txt on a Raspberry Pi)"
Jul 26 06:34:05 kube-master k3s[943]: time="2020-07-26T06:34:05.257859589+01:00" level=fatal msg="failed to find memory cgroup, you may need to add \"cgroup_memory=1 cgroup_enable=memory\" to your linux cmdline (/boot/cmdline.txt on a Raspberry Pi)"
Jul 26 06:34:05 kube-master systemd[1]: Started Lightweight Kubernetes.
Jul 26 06:34:05 kube-master systemd[1]: Started Lightweight Kubernetes.
Jul 26 06:34:05 kube-master systemd[1]: k3s.service: Main process exited, code=exited, status=1/FAILURE
Jul 26 06:34:05 kube-master systemd[1]: k3s.service: Failed with result 'exit-code'.
Jul 26 06:34:10 kube-master systemd[1]: k3s.service: Service RestartSec=5s expired, scheduling restart.
Jul 26 06:34:10 kube-master systemd[1]: k3s.service: Scheduled restart job, restart counter is at 1.
Jul 26 06:34:10 kube-master systemd[1]: Stopped Lightweight Kubernetes.
Jul 26 06:34:10 kube-master systemd[1]: Starting Lightweight Kubernetes...
cat /boot/cmdline.txt
console=serial0,115200 console=tty1 root=PARTUUID=5b7d0535-02 rootfstype=ext4 cgroup_memory=1 cgroup_enable=memory elevator=deadline fsck.repair=yes rootwait
I've tried putting the at cgroup_memory=1 cgroup_enable=memory at the end of the file too, has changed nothing for me. I've rebooted the pi several times as well.
It'd be great if someone could point me in the right direction, thank you.
@plsnotracking I had the same issue on my Raspberry Pi 4 Model Bs after a recent eeprom & kernel update. Btw I'm also running k3s on Raspbian GNU/Linux 10 (buster).
My k3s instances resolved the issue after adding cgroup_memory=1 cgroup_enable=memory to the end of my cat /boot/cmdline.txt file.
So this is happening to me specifically on the pi3's i had in my k3s cluster. My pi4's are perfectly fine with it, and i have this in /boot/cmdline.txt
console=serial0,115200 console=tty1 root=PARTUUID=738a4d67-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory
it would appear that the order may work on pi4 but not pi3. i have yet to find a fix :( Granted, i am replacing my 3's with 4's for other reasons but that's a bit disheartening
The latest kernel updates broke the ‘cgroup’ changes - https://www.raspberrypi.org/forums/viewtopic.php?t=203128
I eventually ended up installing the beta 64bit image raspian os.
Same issue here! Tried to re install my Rpi3s and no luck, had an old pi 3 running previous release as soon as I did an update/upgrade. It no longer works. Going to try and use the 64bit and see how it goes.
The 64bit kernel does appear to resolve the issue, but I have heard anecdotally that performance on older devices can be a bit lacking. You might be better off sticking with an older 32bit OS on your Pi until they fix the cgroups.
I believe that all the Pi kernels now support the correct cgroups.