From f158ac45eff3cd023af83c43b22573dd71b85e59 Mon Sep 17 00:00:00 2001 From: Euan Kemp Date: Tue, 19 Jul 2022 01:58:25 -0700 Subject: [PATCH] nixos/k3s: use default cgroup-driver again Setting `cgroup-driver=systemd` was originally necessary to match with docker, else the kubelet would not start (#111835) However, since then, docker support has been dropped from k3s (#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 https://github.com/NixOS/nixpkgs/issues/181790#issuecomment-1188840862 for a description of this problem. Removing this flag entirely seems reasonable to me, and it results in k3s working again on my machine. --- nixos/modules/services/cluster/k3s/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/modules/services/cluster/k3s/default.nix b/nixos/modules/services/cluster/k3s/default.nix index 421aa0aac60e..bc5e8c66e2a5 100644 --- a/nixos/modules/services/cluster/k3s/default.nix +++ b/nixos/modules/services/cluster/k3s/default.nix @@ -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}")