Files
TerraHome/nixos/kubeadm/README.md
MichaelFisher1997 21be01346b
Some checks failed
Terraform Plan / Terraform Plan (push) Failing after 9s
feat: refactor infra to cp/wk kubeadm topology
Provision 3 thin control planes and 3 workers with role-specific sizing and VMID ranges (701/711), generate per-node cloud-init snippets with SSH key injection, and add NixOS kubeadm host/module scaffolding for cp-1..3 and wk-1..3.
2026-02-28 14:16:55 +00:00

1.1 KiB

Kubeadm Cluster Layout (NixOS)

This folder defines role-based NixOS configs for a kubeadm cluster.

Topology

  • Control planes: cp-1, cp-2, cp-3
  • Workers: wk-1, wk-2, wk-3

What this provides

  • Shared Kubernetes/node prerequisites in modules/k8s-common.nix
  • Role-specific settings for control planes and workers
  • Host configs for each node in hosts/

Hardware config files

Each host file optionally imports hosts/hardware/<host>.nix if present. Copy each node's generated hardware config into this folder:

sudo nixos-generate-config
sudo cp /etc/nixos/hardware-configuration.nix ./hosts/hardware/cp-1.nix

Repeat for each node (cp-2, cp-3, wk-1, wk-2, wk-3).

Deploy approach

Start from one node at a time while experimenting:

sudo nixos-rebuild switch --flake .#cp-1

For remote target-host workflows, use your preferred deploy wrapper later (nixos-rebuild --target-host ... or deploy-rs/colmena).

Notes

  • This does not run kubeadm init/join automatically.
  • It prepares OS/runtime/kernel prerequisites so kubeadm bootstrapping is clean.