Theme

Homelab field notes

I accidentally built a tiny CI/CD platform

A homelab delivery platform with three exclusive cluster profiles: hybrid kubeadm, all-Pimox kubeadm, and native K3s on the Orange Pi 5 Plus. Debian keeps Git, builds, AI tools and recovery available while the cluster changes.

Portfolio case studies

Production-shaped evidence

A closer look at how I design, operate, and investigate real systems in my homelab.

Jeannie: make operations repeatable

Problem: Managing multiple cluster layouts and external services by hand made routine operations harder to repeat safely.

Approach: I built a command-line toolkit for profile-aware workflows, identity checks, diagnostics, deployment preflight, and recovery.

Result: The lab has a documented operational entry point for common tasks across its cluster profiles.

Lesson: Automation is most useful when it explains what it is checking and stops when the evidence is insufficient.

Email me

A Kubernetes delivery platform

Problem: A small lab needed a repeatable way to build, deploy, observe, and recover applications across different cluster layouts.

Approach: I combined OpenTofu, Helm, Argo CD, a private registry, policy checks, and monitoring with cluster identity and scheduling checks.

Result: The same repository describes hybrid kubeadm, all-VM kubeadm, and native K3s layouts, with one profile active at a time.

Lesson: A successful deploy needs more than manifests: placement, storage, identity, and post-deployment readiness matter too.

Email me

Tracing a K3s storage failure

Problem: The native K3s API stopped responding and the service repeatedly failed to start.

Approach: I traced the missing executable message to I/O errors on a stale SSD-backed runtime mount and checked the live mount and filesystem identity.

Result: The investigation distinguished the runtime mount failure from an application or ingress failure; storage health and durable recovery still require verification.

Lesson: An application error can be a storage symptom. Follow the dependency chain and record uncertainty rather than declaring a fix prematurely.

Email me

Architecture map

The homelab, end to end

This diagram shows how source control, deployment, cluster profiles, and services fit together. It describes the intended architecture rather than live availability.

Git & builds → OpenTofu & Argo CD → Kubernetes workloads → Prometheus & Grafana

Explore the detailed architecture
Homelab architecture: delivery, alternative cluster profiles, public edge, and services. The diagram describes configuration, not live health.

The three profiles are alternatives, not simultaneous clusters. Native K3s uses the Orange Pi host directly. Retained disks and data survive mode changes, but storage moves require an explicit verified copy or restore.

Open the Christmas-tree version
Future me, judging

Be honest: why build all this instead of just running a couple containers like a normal person?

Me, holding coffee

Because apparently I looked at "host a website" and thought, "what if this had a control plane, GitOps, retained storage, an image registry, and several new ways to embarrass myself?" The real goal was practice: provision the infra, keep config in Git, deploy with automation, break it, fix it, and make sure I could rebuild it without relying on shell history and vibes.

Future me, judging

Did the cluster really need three VMs to host a website?

Me, holding coffee

The VMs taught me a lot about kubeadm, scheduling, networking and recovery. They also gave a small lab more moving parts to debug. I kept both kubeadm layouts, then added native K3s on the Orange Pi host. The profiles are debian for a laptop control plane with VM workers, pimox for the entirely virtual cluster, and k3s for the native host. One runs at a time; the laptop stays the operations machine.

Future me, judging

So where is the CI/CD part hiding?

Me, holding coffee

OpenTofu owns cluster, platform and app setup. Argo CD reads the configured private Git repository, Buildx creates amd64 and arm64 images, and Kyverno supplies policy checks. Before deployment, Jeannie verifies cluster identity, checks competing runtimes, and estimates scheduling from resource requests, selectors, volumes and ports. A green CPU-usage graph alone does not mean the scheduler can fit another pod.

Future me, judging

Why run your own registry and Gitea? Was the simple option unavailable?

Me, holding coffee

The simple option was very available, which is why I heroically ignored it. The registry means experiments do not need to go to a public image repo, and external Gitea gives the lab its own Git service without making Kubernetes responsible for its own source of truth. Together they make the setup feel less like "some containers under the stairs" and more like a tiny platform with opinions, responsibilities, and occasionally dramatic storage needs.

Future me, judging

What actually hurt the most?

Me, holding coffee

Storage. Always storage. Kubernetes, Docker, retained volumes, and build caches can fill a small root disk with the quiet confidence of a bad decision. Moving OpenEBS local volumes and Docker data to the external SSD turned the lab from "why is everything on fire?" into "okay, this is usable now." Growth, allegedly.

Future me, judging

Where do the platform controllers run now?

Me, holding coffee

Placement follows the selected topology. Multi-node profiles keep platform workloads on labeled workers; the single-node K3s profile labels the selected Orange Pi control plane for platform work. The pipeline must inspect the live cluster instead of insisting that a VM worker from an older deployment exists. State, identity and scheduling checks stay shared across the three profiles.

Future me, judging

Can the current cluster actually handle all that, or are we about to smoke the Pi?

Me, holding coffee

The website and demos stay deliberately small, with expensive demo work in the browser. Native K3s can use the Orange Pi host resources without a VM allocation boundary, but the OS and background services still need their share. Capacity claims come from the live node, not the size printed on the box. The node is Ready; successful platform and app rollouts are separate checks.

Future me, judging

So the lab can now build its own worker nodes?

Me, holding coffee

Yes, and now with fewer crossed fingers. Debian runs a provisioning layer with dnsmasq, nginx, PXE boot files, GRUB, and a Debian 13 arm64 preseed. OpenTofu talks to Pimox through qm, creates VM 9000 on local storage, boots it from the network, installs the OS, runs golden-node prep, disables swap, verifies cgroups, installs containerd and kubeadm tooling, then seals it as a template. Worker clones are idempotent by VMID when a stable non-local Pimox datastore is available.

Future me, judging

And OpenWrt is joining the story too?

Me, holding coffee

The earlier OpenWrt VM workflow has been retired. A separate isolated networking sandbox is planned; it is not part of the cluster deployment.

Future me, judging

What changed on the observability and scheduling side?

Me, holding coffee

The scheduler cares about reservations, placement and local volumes, not only current CPU consumption. Prometheus and Grafana once remained Pending because their retained storage pointed at a fully reserved one-core worker. The pipeline now estimates feasibility before applying, handles initial operator bootstrap separately, and still waits for actual readiness afterward. Old evicted pods are cleanup targets; a live Pending pod needs its scheduling cause fixed.

Recent activity log

What changed since the first build

These entries describe successive stages of the lab, not services that all run at once. The latest milestone is native K3s reporting Ready on the Orange Pi after retiring the accidental laptop installation. Platform and apps still need their own completion checks.

  1. 01 Moved Gitea out of Kubernetes and onto the Raspberry Pi as the local Git service, while keeping the public /git/ route through the edge stack.
  2. 02 Installed and validated a Debian-hosted Gitea Actions runner so pushes to main can build, scan, and deploy without depending on a laptop session.
  3. 03 Added a custom checkout flow for the /git/ subpath and kept a persistent Debian checkout for the deployment scripts.
  4. 04 Added Gitleaks secret scanning and Trivy scanning for the app and infrastructure tree.
  5. 05 Changed deployment so the validated commit is pushed into the local GitOps mirror before jeannie runs, preventing Argo CD from reconciling an older tree.
  6. 06 Hardened the website, demos-static, and registry workloads with non-root containers, read-only root filesystems, resource limits, and explicit writable volumes.
  7. 07 Split the demos into a dedicated demos-static image and Argo CD application so the PHP website stays small and boring.
  8. 08 Changed Gitea backups to dump from the Raspberry Pi Docker container and store archives on the Debian host.
  9. 09 Validated the full main-branch deployment path: fetch main, apply OpenTofu layers, build and push arm64 images, refresh Argo CD, and confirm the runner completes successfully.
  10. 10 Built the Debian 13 arm64 Pimox template end to end with PXE, preseed, qemu-guest-agent discovery, cgroup validation, swap disabled, and a final seal step.
  11. 11 Added Pimox worker clone automation so VM 9000 stays on local storage while worker nodes use a selected non-local datastore.
  12. 12 Previously experimented with an OpenWrt VM workflow; that workflow has since been retired in preparation for an isolated sandbox.
  13. 13 Installed the monitoring stack and moved platform add-ons such as Argo CD, Kyverno, and prometheus-stack work toward app-worker placement instead of treating the control plane as spare capacity.
  14. 14 Reworked the website image to keep Apache as the web server while moving PHP execution to PHP-FPM, enabling OPcache, and validating the runtime through Gitea Actions instead of local image builds.
  15. 15 Pre-rendered the read-heavy website pages into static HTML, moved visitor ideas behind a small JSON endpoint, added cache headers, enabled HTTP/2 and connection reuse at the OCI edge, and measured reused HTTP/2 asset loads around 60ms.
  16. 16 Added image signing and SBOM validation: jeannie now builds with SBOM metadata, signs php-website and demos-static with Cosign, attaches signed SPDX SBOM attestations, and Kyverno audits unsigned local-registry pods before enforcement is promoted.
  17. 17 Migrated Kubernetes to the Pimox VM profile while keeping Debian responsible for Jeannie, Gitea, Docker builds, the registry endpoint, Ollama, and the AI stack.
  18. 18 Added the OmniRoute AI gateway, seeded provider keys safely from local files, created runtime-validated free model routes, and wired goose, Holmes, and Hermes through Jeannie wrappers.
  19. 19 Hardened Pimox redeployability after real failures: VM CPU pinning on big cores, qemu-agent/SSH readiness waits, containerd 2.x registry configuration, stale pod cleanup, and node imagefs cleanup before app deploys.
  20. 20 Added per-profile state and pinned API endpoint, CA fingerprint and namespace UID so an old kubeconfig cannot silently redirect a deployment into another cluster.
  21. 21 Added scheduling feasibility checks and runtime exclusion across the debian, pimox and k3s profiles. One-core workers are assessed by actual capacity and reservations rather than a fixed two-core requirement.
  22. 22 Retired accidental laptop K3s with retained state and datastore backups, preserved the source registry, and copied verified registry data to the Orange Pi before native K3s startup. Other old laptop PVC data stays preserved locally.
  23. 23 On November 2, 2026, the native opi5plus node at 192.168.100.80 reported Ready. Platform and apps remain separate rollout milestones; a Ready node alone does not prove either is finished.

Technologies and why they are here

Improvement backlog

Todo list for the next homelab pass

These are improvement proposals, not chores for the sake of chores. Each item either reduces rebuild risk, tightens supply-chain hygiene, or makes the platform easier to operate when something fails.

Visitor ideas

What would you improve next?

Send a practical idea for the homelab backlog. Submissions are stored as plain text, limited in size, and rendered escaped.