nixos/kubernetes: actually set containerd to use systemd cgroups
The correct configuration is listed in the kubernetes documentation https://kubernetes.io/docs/setup/production-environment/container-runtimes/#containerd-systemd The correct option can also be seen in `containerd config default`
This commit is contained in:
parent
2d356a1969
commit
97864e984d
3 changed files with 1 additions and 13 deletions
|
@ -26,10 +26,7 @@ let
|
|||
|
||||
containerd.runtimes.runc = {
|
||||
runtime_type = "io.containerd.runc.v2";
|
||||
};
|
||||
|
||||
containerd.runtimes."io.containerd.runc.v2".options = {
|
||||
SystemdCgroup = true;
|
||||
options.SystemdCgroup = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -264,8 +264,6 @@ in
|
|||
"net.bridge.bridge-nf-call-ip6tables" = 1;
|
||||
};
|
||||
|
||||
systemd.enableUnifiedCgroupHierarchy = false; # true breaks node memory metrics
|
||||
|
||||
systemd.services.kubelet = {
|
||||
description = "Kubernetes Kubelet Service";
|
||||
wantedBy = [ "kubernetes.target" ];
|
||||
|
|
|
@ -60,13 +60,6 @@ let
|
|||
advertiseAddress = master.ip;
|
||||
};
|
||||
masterAddress = "${masterName}.${config.networking.domain}";
|
||||
# workaround for:
|
||||
# https://github.com/kubernetes/kubernetes/issues/102676
|
||||
# (workaround from) https://github.com/kubernetes/kubernetes/issues/95488
|
||||
kubelet.extraOpts = ''\
|
||||
--cgroups-per-qos=false \
|
||||
--enforce-node-allocatable="" \
|
||||
'';
|
||||
};
|
||||
}
|
||||
(optionalAttrs (any (role: role == "master") machine.roles) {
|
||||
|
|
Loading…
Reference in a new issue