我有几个安装了 ubuntu 22.04 的树莓派。我在它们上面安装了 microk8s (1.25)。我还按照此处的说明启用了内存 cgroup:https://microk8s.io/docs/install-alternatives#heading--arm。
ubuntu@pi43:$ cat /proc/cmdline
coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=0 bcm2708_fb.fbheight=0 bcm2708_fb.fbswap=1 smsc95xx.macaddr=E4:5F:01:0B:14:8A vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=LABEL=writable rootfstype=ext4 elevator=deadline rootwait fixrtc quiet splash cgroup_enable=memory cgroup_memory=1
因此看起来内存 cgroup 已启用。
然而,当我运行 microk8s 检查时,我收到警告,情况并非如此:
ubuntu@pi43:$ sudo microk8s inspect
Inspecting system
(...)
WARNING: The memory cgroup is not enabled.
The cluster may not be functioning properly. Please ensure cgroups are enabled
为什么会这样?