Updated on 2024-09-11 GMT+08:00

How Do I Downgrade a cgroup?

Symptom

The etcd Kubernetes container cannot be started. Run the journalctl -u containerd command to view the containerd log. The following log is displayed:

applying cgroup configuration for process caused \\\"mountpoint for cgroup not found\\\"\"\n

Run the stat -fc %T /sys/fs/cgroup/ command to check the cgroup version. The command output shows that the cgroup version is cgroup2fs. The root cause is that cgroup v2 of Kubernetes has not passed GA and cgroup needs to be downgraded.

Procedure

  1. Add systemd.unified_cgroup_hierarchy=no to the GRUB_CMDLINE_LINUX configuration item in the /etc/default/grub file and disable cgroup v2.

    GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=no"

  2. Run the sudo grub-mkconfig -o /boot/grub/grub.cfg command to regenerate the boot.
  3. Run the reboot command to restart the server.