Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cgroup driver setup fails: failed to run Kubelet: misconfiguration: kubelet cgroup driver: \"cgroupfs\" is different from docker cgroup driver: \"systemd\" #5738

Closed
1 task
ysicing opened this issue Jun 17, 2022 · 2 comments

Comments

@ysicing
Copy link

ysicing commented Jun 17, 2022

Environmental Info:
k3s version v1.23.7+k3s1 (ec61c66)
go version go1.17.5

Node(s) CPU architecture, OS, and Version:

Linux k3s01 5.17.0-3-amd64 #1 SMP PREEMPT Debian 5.17.11-1 (2022-05-26) x86_64 GNU/Linux

Cluster Configuration:

1 server

Describe the bug:

K3s now uses the systemd cgroup driver instead of cgroupfs when running under systemd 244 or later. #5462

Steps To Reproduce:

  • Installed K3s:
# docker /etc/docker/daemon.json

{
  "exec-opts": [
    "native.cgroupdriver=systemd"
  ],
  "bip": "169.254.123.1/24",
  "storage-driver": "overlay2"
}

# k3s
k3s server --docker

Expected behavior:

K3S should start.

Actual behavior:

"Failed to run kubelet" err="failed to run Kubelet: misconfiguration: kubelet cgroup driver: \"cgroupfs\" is different from docker cgroup driver: \"systemd\""

Additional context / logs:

Backporting

  • Needs backporting to older releases
@brandond
Copy link
Member

brandond commented Jun 17, 2022

If you manually change the cgroup driver for docker to systemd, you should change it for the kubelet too, with --kubelet-arg=cgroup-driver=systemd. K3s only manages the driver when using the packaged containerd.

You should be aware that dockershim is gone as of 1.24; k3s will no longer support the --docker flag.

@ysicing
Copy link
Author

ysicing commented Jun 17, 2022

thank you. I thought k3s would config it automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants