generation 500 25.11.20250714.62e0f05

This commit is contained in:
2025-08-24 04:25:29 -04:00
parent 6478b8be2d
commit e94a3e1656
6 changed files with 44 additions and 6 deletions

38
extras/kube-master.nix Normal file
View File

@@ -0,0 +1,38 @@
{
config,
pkgs,
...
}: let
# When using easyCerts=true the IP Address must resolve to the master on creation.
# So use simply 127.0.0.1 in that case. Otherwise you will have errors like this https://github.com/NixOS/nixpkgs/issues/59364
kubeMasterIP = "172.24.233.22";
kubeMasterHostname = "api.kube";
kubeMasterAPIServerPort = 6443;
in {
# resolve master hostname
networking.extraHosts = "${kubeMasterIP} ${kubeMasterHostname}";
# packages for administration tasks
environment.systemPackages = with pkgs; [
kompose
kubectl
kubernetes
];
services.kubernetes = {
roles = ["master" "node"];
masterAddress = kubeMasterHostname;
apiserverAddress = "https://${kubeMasterHostname}:${toString kubeMasterAPIServerPort}";
easyCerts = true;
apiserver = {
securePort = kubeMasterAPIServerPort;
advertiseAddress = kubeMasterIP;
};
# use coredns
addons.dns.enable = true;
# needed if you use swap
kubelet.extraOpts = "--fail-swap-on=false";
};
}

View File

@@ -83,7 +83,7 @@ in {
toolbar = true;
bookmarks = [
{
name = "Nixos";
name = "nixos";
bookmarks = [
{
name = "noogle";
@@ -108,7 +108,7 @@ in {
];
}
{
name = "CMU";
name = "cmu";
bookmarks = [
{
name = "computing facilities";
@@ -170,7 +170,7 @@ in {
];
}
{
name = "Cal";
name = "cal";
url = "https://calendar.google.com/";
}

View File

@@ -8,8 +8,8 @@
./hardware-configuration.nix
../../system/system.nix
../meta.nix
./ssh.nix
./gpu.nix
../../extras/ssh.nix
../../extras/gpu.nix
];
config = {

View File

@@ -8,7 +8,7 @@
./hardware-configuration.nix
../../system/system.nix
../meta.nix
./ssh.nix
../../extras/ssh.nix
];
config = {