Compare commits

..

2 Commits

Author SHA1 Message Date
minish 9bd1f0cfa1
Initial deployment of Kubernetes control plane 2024-11-02 02:56:58 -04:00
minish 12b327ca88
htop -> btop 2024-11-02 01:50:53 -04:00
5 changed files with 39 additions and 2 deletions

View File

@ -45,7 +45,7 @@
git git
vim vim
fastfetch fastfetch
htop btop
]; ];
environment.variables.EDITOR = "vim"; environment.variables.EDITOR = "vim";

View File

@ -74,7 +74,7 @@ in {
git git
vim vim
fastfetch fastfetch
htop btop
speedtest-cli speedtest-cli
]; ];
environment.variables.EDITOR = "vim"; environment.variables.EDITOR = "vim";

View File

@ -15,6 +15,12 @@
"/var/lib/acme" "/var/lib/acme"
"/srv" "/srv"
# k8s
"/var/lib/containerd"
"/var/lib/kubernetes"
"/var/lib/kubelet"
"/var/lib/kube-proxy"
]; ];
files = [ files = [
"/etc/machine-id" "/etc/machine-id"

View File

@ -7,6 +7,7 @@
./gitea.nix ./gitea.nix
./synapse.nix ./synapse.nix
./nebula.nix ./nebula.nix
./k8s.nix
]; ];
security.acme = { security.acme = {

View File

@ -0,0 +1,30 @@
{pkgs, ...}: let
kMasterIp = "10.13.0.1";
kMasterHostname = "silver";
kMasterApiServerPort = 6443;
in {
networking.extraHosts = "${kMasterIp} ${kMasterHostname}";
systemd.services.etcd.preStart = ''${pkgs.writeShellScript "etcd-wait" ''
while [ ! -f /var/lib/kubernetes/secrets/etcd.pem ]; do sleep 1; done
''}'';
services.kubernetes = {
roles = ["master" "node"];
masterAddress = kMasterHostname;
apiserverAddress = "https://${kMasterHostname}:${toString kMasterApiServerPort}";
apiserver = {
securePort = kMasterApiServerPort;
advertiseAddress = kMasterIp;
};
easyCerts = true;
# use coredns
addons.dns.enable = true;
# needed if you use swap
kubelet.extraOpts = "--fail-swap-on=false";
};
}