Back in June I wrote about load-balancing a self-hosted cluster with Cilium BGP. That cluster was three nodes and an echo server. Five months later it runs most of my house: Git hosting, CI, single sign-on, a SIEM, audiobooks, voice dictation, the thermostat, and this website. More and more of the day-to-day work on it is done by AI coding agents that I review, not ones that I trust blindly.
This post is a tour of what’s running now, and the direction it’s heading.
Addresses and host names are left out on purpose. The configuration itself is public in SkippySteve/homelab.
The numbers#
| What | Today |
|---|---|
| Nodes | 3, Debian 13, Kubernetes 1.36 (Kubespray) |
| Namespaces | 88 |
| Pods | ~200 |
| Flux Kustomizations | 77 |
Things I install by hand with kubectl apply |
trying hard to keep it at zero |
Hardware and network#
Nothing fancy, and most of it is used gear:
- Firewall/router: OPNsense, virtualized on Proxmox.
- Core switch: a Juniper EX4200 doing the inter-VLAN routing. OPNsense, the switch and the cluster all speak BGP to each other, each with its own private AS number.
- kube-node-01: a small box (2 CPU, 8 GiB). Control plane and etcd.
- kube-node-02: 20 CPU, 32 GiB, plus a ZFS RAIDZ1 pool on three 1 TB SATA SSDs. This is where the stateful apps live.
- kube-node-03: 20 CPU, 32 GiB, NVMe. Observability and the AI agent workspaces.
The control plane is highly available: the API server sits behind a keepalived VIP that fails over between two nodes, and three etcd members keep quorum if one node dies. Cilium replaces kube-proxy, announces LoadBalancer IPs over BGP, and runs a host firewall on the nodes. Traefik (a DaemonSet, as in the June post) terminates TLS and handles the Gateway API routes.
Everything is in Git#
The biggest change since June isn’t any one tool. It’s that the cluster is whatever the Git repository says it is.
- Flux (the GitOps controller) reconciles the cluster from a self-hosted Forgejo instance. Helm charts run as Flux HelmReleases too, so even “helm upgrade” happens by merging a PR.
- Forgejo Actions runners in the cluster build every custom image and scan it with Trivy before it can ship. Images are pinned by digest, never
:latest. - Renovate opens the version-bump PRs.
- One merge per change. I merge the PR that makes a change. CI builds the images, opens a single promotion PR that only changes image digests, and a small in-cluster robot merges it once Forgejo proves CI built those images from
main. Then Flux applies it. Before this, one feature could cost me five or six merges, and most of them were just “yes, use the image CI just built”.
If a change needs a step outside Git (a host file, a reboot, a credential), it goes on a written list of hand steps. The goal is for that list to keep shrinking.
Security: default-deny, and seeing everything#
My day job and studies are security, so the lab doubles as a place to practice what I preach.
Network. Every namespace starts with a default-deny NetworkPolicy, then gets one explicit allow rule per real need, each with a comment saying why. Adding a namespace or an allow rule is treated as an access change that I approve myself.
Identity and secrets. Authentik provides single sign-on (the goal is every app behind it). OpenBao (the open-source fork of Vault) holds secrets, SOPS encrypts the few that live in Git, and cert-manager handles certificates. Every credential has an entry in an inventory with a rotation rule, and CI fails if a change adds a credential without updating it.
The front door. This site is the first thing in the cluster the internet can reach. Requests go through a WAF (ModSecurity with the OWASP Core Rule Set), then a dedicated public Traefik entrypoint that only accepts traffic from the WAF, then two locked-down pods: Caddy on a distroless image, read-only, no shell. I moved it off a hosted CDN so I can see who asks for what and what attacks arrive, and so nobody else terminates my TLS.
Detection. This is the part I’ve had the most fun with:
- Metrics, logs and traces: Prometheus, Loki, Tempo and Grafana, fed by OpenTelemetry collectors. OpenObserve runs alongside them.
- SIEM: Wazuh, collecting logs from the cluster, the Kubernetes audit log and OPNsense.
- Runtime security: Falco and Cilium Tetragon watch syscalls and process execution. Hubble records network flows.
- Vulnerabilities: the Trivy operator scans everything that runs, and alerts on fixable criticals.
- Network telemetry: OPNsense exports NetFlow, and a small labeller joins it with DHCP leases. So instead of “10.x.x.x talked to some IP” I see “the living-room TV talked to this ASN”. Next on that list is an alert for traffic with no DNS lookup behind it.
- Detection drills: scheduled jobs that act like an attacker on purpose, to prove the alerts actually fire.
What actually runs on it#
The fun part:
- Forgejo: Git hosting and CI for everything, including this site.
- Audiobookshelf, BookOrbit and OpenList for books and files.
- Karakeep: bookmarks and read-later.
- Matrix for chat, and ntfy for phone notifications.
- Whisper / Speaches: voice dictation and speech-to-text, in the cluster instead of a cloud API.
- Home climate: the Nest thermostat, read locally over Matter (no Google cloud), with alerts if the house gets too cold or the furnace stops heating it. In winter that one stops being a toy.
- KubeVirt for the occasional full virtual machine.
- This blog, built and scanned in CI and served from the cluster.
AI agents, on a leash#
Most of the PRs to this cluster are now written by AI coding agents. That’s only comfortable because of how they’re boxed in, and that boxing grew into its own open-source project: Glovecell.
The idea: one locked-down Kubernetes sandbox (“cell”) per project. It’s built on the upstream Kubernetes Agent Sandbox project. Each cell gets:
- a gVisor sandbox and Cilium network policy, so it can’t touch the rest of the cluster;
- a Git identity scoped to one repository, with
mainprotected. The agent can open PRs, but can’t merge them or push tomain; - inspected egress: a proxy that allows exact host + method + path rules instead of “whatever the agent can curl”;
- credentials that never enter the cell: the proxy injects them on the way out;
- time-boxed access: when an agent needs more permissions to diagnose something, it borrows a Kubernetes Role for a few hours and I approve it, like PIM (privileged identity management) for robots.
On top of that, every PR says on its first line whether it’s a two-way door (reverting it undoes everything) or a one-way door (anything else: deletions, credentials, access, firewall, anything published outside). Robots may merge some two-way changes on their own, like docs and dashboards. Every one-way door waits for me.
Where it’s heading#
This is the part I’m most excited about. Roughly in the order I expect to get to it:
- Autonomy as a dial. While I’m still building, agents get more freedom (robots merge more kinds of safe changes, I approve plans instead of every PR). As each area reaches its end state, the dial turns back down until nothing merges without me. Turning it up is always my decision. Turning it down is something any agent may propose.
- Rules become checks. Every guardrail that’s an English sentence today (“don’t widen your own permissions”) should become an admission policy, a network policy or a CI check with a test. English rules are fine for building. Machine checks are what you want once it’s done.
- Real storage classes. Today storage is mostly folders on local disks. Next: a CSI driver that gives every volume its own ZFS dataset, with real size limits, snapshots and resizing, in three classes:
fast,redundantandscratch. A new NVMe in node-03 makesfastreal. - CIS-hardened nodes. When the nodes are rebuilt, they move from Kubespray to RKE2 with its CIS profile turned on. It’s Apache-2.0 and hardened by default. Until then I’m hardening the current nodes step by step and measuring against the same benchmark.
- The firewall moves into the cluster. The plan is to run OPNsense as an HA pair of KubeVirt VMs on two nodes, turn the core switch into a plain Layer 2 switch, and add proper guest and IoT Wi-Fi. It’s ordered by cost, free phases first.
- Token-aware ingress. Envoy Gateway is running next to Traefik as a pilot, so scripts and services can use real JWT/OAuth tokens (not just browser sign-in) without a paid add-on.
- Active Directory for the family PCs. Windows Server domain controllers as VMs in the cluster, on their own VLAN, so the family PCs get central sign-in and group policy. A good excuse to practice AD security at home.
- Fewer one-off scripts. Small long-running Python services get rewritten in Go, and before I write anything custom I look for a maintained open-source project that already does the job.
- More in the open. The cluster configuration is published as a showcase repository, Glovecell is developed in public, and I’m sending fixes upstream to the projects I run, including Agent Sandbox itself.
What I’ve learned#
- GitOps changes how you think more than what you run. Once “kubectl apply” feels wrong, you start designing everything to be reviewable and revertable.
- “Can I undo this?” is the best question to ask about a change. The two-way/one-way door split has saved me more than any single tool.
- Default-deny hurts for a week, then it’s just how things work. And every allow rule with a comment explains the system better than a diagram.
- AI agents are great at volume and bad at judgment. Give them a small box, real tests, and a human on every irreversible step.
If you’re building something similar, or want to try Glovecell, reach out. Links are in the sidebar.