Skip to content

Commit

Permalink
nixos/k3s: use default cgroup-driver again
Browse files Browse the repository at this point in the history
Setting `cgroup-driver=systemd` was originally necessary to match with
docker, else the kubelet would not start (NixOS#111835)

However, since then, docker support has been dropped from k3s (NixOS#177790).
As such, this option is much less necessary.

More importantly, it now seems to be actively causing issues. Due to an
upstream k3s bug, it's resulting in the kubelet and containerd having
different cgroup drivers, which seems to result in some difficult to
debug failure modes.

See
NixOS#181790 (comment)
for a description of this problem.

Removing this flag entirely seems reasonable to me, and it results in
k3s working again on my machine.
  • Loading branch information
euank committed Jul 19, 2022
1 parent d2db107 commit f158ac4
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion nixos/modules/services/cluster/k3s/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ in
[
"${cfg.package}/bin/k3s ${cfg.role}"
]
++ (optional (config.systemd.enableUnifiedCgroupHierarchy) "--kubelet-arg=cgroup-driver=systemd")
++ (optional cfg.disableAgent "--disable-agent")
++ (optional (cfg.serverAddr != "") "--server ${cfg.serverAddr}")
++ (optional (cfg.token != "") "--token ${cfg.token}")
Expand Down

0 comments on commit f158ac4

Please sign in to comment.