Homelab Bootstrap #
Layers #
ansible/: host bootstrap for K3s, storage assumptions, and NixOS rebuilds.nixie-installer/: temporary NixOS installer flake used bymake nixie.../flux: Flux source object applied by Ansible.../platform: platform Helm charts and HelmRelease objects.../apps: app Helm charts and HelmRelease objects.scripts/: one-time bootstrap helpers.
Bootstrap #
- Set the storage mount points in
ansible/inventory/home.yml. - Confirm those mount points and app data paths exist on the host.
- Configure K3s, NFS media exports, and Longhorn prerequisites on the host:
cd bootstrap
make bootstrap-k3s
- Install Flux source/helm controllers and apply the release objects:
cd bootstrap
make flux-bootstrap
This installs source-controller and helm-controller.
homelab.node/nas=true is a Kubernetes label for the node that owns the NAS
storage role. It is not the Kubernetes node name; the current node name is
metal0.
NixOS Nodes #
Run Nixie from the repo root:
make nixie
That target uses bootstrap/nixie-installer for the temporary PXE system and
nixos/nixie-hosts.json to map machine MAC addresses to host configs.
Existing NixOS nodes are rebuilt through Ansible:
make nixos-rebuild host=metal2
Kubernetes VIP #
kube-vip advertises 192.168.1.100 for the Kubernetes API and Traefik app
ingress. The platform chart lives in ../platform/kube-vip and is applied by
Flux. K3s ServiceLB is disabled so kube-vip owns LoadBalancer Services.
Rollout order:
- Run
make bootstrap-k3ssometal0includes192.168.1.100in the K3s API certificate SANs. - Run
make nixos-rebuild host=metal1andmake nixos-rebuild host=metal2so the NixOS control-plane nodes include the same SAN. - Commit and push the platform change, then reconcile Flux.
- Verify the VIP and Traefik service:
kubectl --context homelab -n kube-system get pods -l app.kubernetes.io/name=kube-vip -o wide
kubectl --context homelab -n traefik get svc traefik
curl -k https://192.168.1.100:6443/readyz
curl -k https://192.168.1.100/
Local Validation #
cd bootstrap
make validate-cluster
This validates release YAML and renders local Helm charts. It does not contact a Kubernetes cluster.