Susan

Homelab

Coming soon

This setup turns a few machines of your local network into a Kubernetes cluster with MicroK8s, then installs the suite on it with a Helm chart. Each run gets its own pod, with a collector that keeps its messages on disk, mutual TLS to the operator and a network policy.

The reference is the cluster this project runs on: three machines today, planned to grow to ten. The values file of that cluster, deploy/helm/nexus-factory/values-nexus.yaml, is the starting point for yours. The Ansible playbook still names the reference machines: before you play it, replace the host names in infra/playbooks/site.yml (the add-ons and Kueue plays target herbie, the WireGuard play targets lanning).

What the cluster runs

LayerComponent
SystemUbuntu Desktop 26.04.1 on each machine, MicroK8s from a 1.xx/stable snap channel
Cluster add-onsrbac, hostpath-storage, ingress, cert-manager, helm3, observability (Prometheus, Loki, Tempo)
Job queueKueue, which admits runs under a cluster-wide limit
SuiteOperator, dashboard and Forgejo, installed by the chart deploy/helm/nexus-factory
ImagesThe registry add-on of MicroK8s, fed by deploy/helm/nexus-factory/push-images.sh

Prepare a machine

  1. Reserve a fixed IP address for the machine in your router. MicroK8s links the nodes by address.

  2. Generate the unattended install files, for example for a machine named speedy:

    infra/bootstrap/make-seed speedy path/to/public-key.pub /tmp/seed-speedy
    
  3. Copy user-data and meta-data to a FAT32 USB key named CIDATA, plug it in with the Ubuntu installer key, and boot. The install runs without questions.

Add the machine to the cluster

From your workstation:

nexusadm node add speedy 192.168.1.132

A window asks you to confirm. The command then writes infra/inventory/noeud-speedy.yml and plays the Ansible playbook infra/playbooks/site.yml on that machine: base system, MicroK8s, firewall, cluster join. Running the same command again changes nothing.

nexusadm node list shows the new node Ready after a few minutes. nexusadm doctor checks every node.

Install the suite

Build and push the images, then install the chart. The commands and the accesses to request are in docs/installer-et-mettre-a-jour.md (in French) and in deploy/helm/nexus-factory/README.md.

deploy/helm/nexus-factory/push-images.sh
nexushelm --nexusconfig <access> upgrade --install nexus deploy/helm/nexus-factory -n nexus-system \
  -f deploy/helm/nexus-factory/values-nexus.yaml --set images.tag=<version> ...

nexushelm and nexusctl wrap helm and kubectl: they log every call, mask the values of Secrets, and use time-limited accesses that you approve in a confirmation window (nexusadm grant request). See Tools.

Remove a machine

nexusadm node remove speedy drains the node, removes it from the control plane and deletes its inventory file. --dry-run prints the steps without running them. Local volumes of the node are not moved.