nix/nixos/k3s/default.nix

28 lines
514 B
Nix
Raw Normal View History

2023-07-09 23:25:45 +02:00
{ pkgs, ... }:
{
networking.firewall.allowedTCPPorts = [
# k8s api
6443
# metrics-server
10250
];
services.k3s = {
enable = true;
role = "server";
extraFlags = toString [
2023-07-18 20:10:07 +02:00
"--disable traefik,metrics-server" # manuelle ... with ipv6 enable
2023-07-09 23:25:45 +02:00
];
};
systemd.services.k3s = {
wants = [ "containerd.service" ];
after = [ "containerd.service" ];
serviceConfig.MemoryMax = "2G";
};
environment.systemPackages = with pkgs; [
k3s
k9s
kubectl
];
}