kubernetes, bare metaling

This commit is contained in:
BOTAlex 2026-05-07 13:47:57 +02:00
parent fc6edfa41b
commit 1409710022
10 changed files with 253 additions and 156 deletions

32
kubenetes/kubelet.nix Normal file
View file

@ -0,0 +1,32 @@
{ pkgs, ... }:
{
systemd.services.kubelet = {
description = "kubelet: The Kubernetes Node Agent";
documentation = [ "https://kubernetes.io/docs/home/" ];
# Unit requirements
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
serviceConfig = {
# Use the kubelet binary from the Nix store
ExecStart = ''${pkgs.kubernetes}/bin/kubelet \
--config=/var/lib/kubelet/config.yaml \
--kubeconfig=/etc/kubernetes/kubelet.conf \
--pod-manifest-path=/etc/kubernetes/manifests
'';
Restart = "always";
RestartSec = 10;
};
# Systemd 230+ uses StartLimitIntervalSec in the [Unit] section
unitConfig = {
StartLimitIntervalSec = 0;
};
# Equivalent to [Install] WantedBy
wantedBy = [ "multi-user.target" ];
};
}