kubelet service not compatible with cgroups v2
See original GitHub issueI have a snap-based microk8s installation on Fedora. After upgrading to Fedora 31 Beta, kubelet service failed to start:
Sep 17 23:34:14 k8s.sakura-it.pl microk8s.daemon-kubelet[5736]: I0917 23:34:14.837307 5736 server.go:425] Version: v1.15.3
Sep 17 23:34:14 k8s.sakura-it.pl microk8s.daemon-kubelet[5736]: I0917 23:34:14.837804 5736 plugins.go:103] No cloud provider specified.
Sep 17 23:34:14 k8s.sakura-it.pl systemd[1]: run-rac03045094fb44c29a3af5719f0b1a94.scope: Succeeded.
Sep 17 23:34:14 k8s.sakura-it.pl microk8s.daemon-kubelet[5736]: F0917 23:34:14.857370 5736 server.go:273] failed to run Kubelet: mountpoint for cpu not found
This seems to be related to a change introduced in Fedora, that made cgroups v2 default: https://fedoraproject.org/wiki/Changes/CGroupsV2
Setting systemd.unified_cgroup_hierarchy=0
kernel parameter (essentially, going back to cgroups v1) works the problem around and now kubelet starts again.
I’d include the result of microk8s.inspect, it wasn’t for the fact that inspect script fails due to #631 .
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
kubelet service not compatible with cgroups v2 #651 - GitHub
I have a snap-based microk8s installation on Fedora. After upgrading to Fedora 31 Beta, kubelet service failed to start: Sep 17 23:34:14 ...
Read more >Fix kubelet on FCOS 34 (I2f965142) - Gerrit Code Review
Fix kubelet on FCOS 34 Fedora CoreOS 34 has switched from cgroups v1 to cgroups v2 by default, which changes the sysfs hierarchy....
Read more >Five Things to Prepare for Cgroup v2 with Kubernetes
Deploy cAdvisor compatible with cgroup v2. ... Decide whether to adopt cgroup v2 or not; Three things to prepare for infrastructure.
Read more >About cgroup v2 - Kubernetes
On Linux, control groups constrain resources that are allocated to processes. The kubelet and the underlying container runtime need to ...
Read more >Kubelet service not starting in mmumshad's hardway
May 22 09:15:17 worker-1 kubelet[36777]: I0522 09:15:17.345149 36777 server.go:666] --cgroups-per-qos enabled, but --cgroup-root was not ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Editing
/var/snap/microk8s/current/args/containerd-template.toml
updatingruntime_type
toio.containerd.runc.v2
works!https://github.com/ubuntu/microk8s/issues/651#issuecomment-718799924 works for me as well to solve
after starting Microk8s for the first time in a while after some OS/kernel upgrades. Reference: https://github.com/ubuntu/microk8s/blob/c22142ae3c2bd3702b891e68d53704eb153c4efd/microk8s-resources/wrappers/run-containerd-with-args#L43-L45