nixos install
# Disable firewall.
#
# You could whitelist all the ports needed, but this is easier for
# development.
networking.firewall = {
enable = false;
};
# Setup K3s.
services.k3s = {
enable = true;
role = "server";
};
stop/start cluster
You can control the cluster with systemd.
sudo systemctl stop k3s
destroy cluster
To stop all of the K3s containers and reset the containerd state, the
k3s-killall.sh script can be used.
/usr/local/bin/k3s-killall.sh