buxiaomo / kubeasy

deploy kubernetes binaries with ansible
GNU General Public License v2.0
53 stars 17 forks source link

[Bug]: Kubelet fails to start on Ubuntu 22.04 - Failed to start ContainerManager failed to get rootfs info: unable to find data in memory cache #12

Closed buxiaomo closed 8 months ago

buxiaomo commented 8 months ago

Your Environment

Operating System: Ubuntu 22.04 Kubernetes version: v1.18.20 Kubernetes Container runtime: docker Kubernetes Container networks: flannel

group_vars/all.yml file content?

default

group_vars/kubernetes.yml file ?

default

Context

No response

Log Information

Mar 07 19:57:09 vm117011 kubelet[25981]: F0307 19:57:09.159866   25981 kubelet.go:1399] Failed to start ContainerManager failed to get rootfs info: unable to find data in memory cache
buxiaomo commented 8 months ago

k8s < 1.19 do not support Cgroups v2

run the stat -fc %T /sys/fs/cgroup/ command on the node:

For cgroup v2, the output is cgroup2fs. For cgroup v1, the output is tmpfs.

Try to add systemd.unified_cgroup_hierarchy=0 to /etc/default/grub your boot options and see what Kubelet does

GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1 systemd.unified_cgroup_hierarchy=0"

update-grub2