Moving my homelab from VMs to k3s
contents
Over a week (26 October to 2 November 2026) I moved my media and app workloads off five Proxmox VMs and onto a single k3s node managed by Argo CD. This post covers where things lived before, where they live now, and what broke along the way.
Updated 2 December 2026: remote access moved off the Proxmox host and onto the router. See the update.
Internal hostnames and addresses in this post are placeholders.
Before: one VM per job#
Everything runs on one Proxmox host: a Ryzen 5 5600 with 32 GB of RAM. It ran 12 VMs and sat at about 80% RAM. The ones that mattered for this move:
| VM | What it ran |
|---|---|
| Traefik VM | Reverse proxy for every *.lab.paulustech.uk name |
| Jellyfin VM | Jellyfin |
| Cadence VM | Cadence, the music streaming app I’m building (API, web, Postgres) |
| Two small VMs | A few small apps, a file share and a speed test page |
| Samba file server | The file shares everything else mounts |
| CI VM | Docker registry, a secrets vault for CI, the GitHub Actions runner |
Every app VM was Ubuntu plus Docker Compose, set up by its own Ansible playbook. Adding an app meant:
- a new VM, or squeezing it onto an existing one
- a new Ansible playbook
- a new Traefik router on the Traefik VM
- a new CNAME in Pi-hole pointing at the Traefik VM
- CI that SSHes into the VM to redeploy
That’s too much friction to try out an idea on a Saturday morning. And every VM paid for its own OS: kernel, systemd, Docker daemon, all running five times over.
The app VMs also each mounted the Samba server over CIFS. If a VM booted before the Samba server was up, the mount failed and the app started against an empty folder.
Why k3s#
The goal I wrote down: idea → git push → running at <app>.lab.paulustech.uk, on VMs that can be destroyed and rebuilt.
- k3s is real Kubernetes. It’s CNCF-certified, so everything I learn transfers. It’s also one binary with a low memory footprint, and it comes with Traefik, local-path storage and a load balancer built in. Full kubeadm would have meant setting up etcd, networking, load balancing and storage by hand, for no gain on one box.
- One node, not three. There’s one physical host. Three VMs on it would give me three times the overhead and no extra availability: if the host dies, they all die.
- Argo CD for deploys. The cluster pulls its desired state from a git repo. Nothing pushes into it.
After: one k3s VM#
The k3s node is a Proxmox VM with 12 GB of RAM, 8 vCPUs, and two virtual disks: one for the OS and one for app volumes. The data disk is mounted where k3s keeps local-path volumes, so the OS disk can be thrown away and rebuilt.
What runs on it#
- Cadence, the music streaming app I’m building.
- Jellyfin, the media server.
- Lectern, a book reading app: upload a book once, read it on any device, and it opens where you left off.
- A money management app for keeping an eye on spending.
- Rancher, a dashboard for poking around the cluster.
- A handful of side projects that come and go.
The pieces#
- Argo CD, “app of apps”. One
rootApplication, applied by hand once, syncs theargocd/folder. That folder defines everything else, including two ApplicationSets that turn folders into apps:workloads/<namespace>/<app>/values.yaml: single-container apps, rendered with one generic Helm chart. A new app is about five lines of YAML.stacks/<namespace>/<app>/*.yaml: plain manifests for multi-container apps like Cadence.
- One wildcard DNS record. Pi-hole answers the k3s node’s IP for anything under
lab.paulustech.uk. A new app needs no DNS change at all. - One wildcard certificate. cert-manager gets
*.lab.paulustech.ukfrom Let’s Encrypt using a Cloudflare DNS challenge, so nothing needs to be reachable from the internet. Traefik serves it for every hostname and redirects HTTP to HTTPS. - Sealed Secrets. Secrets are encrypted with the cluster’s key and committed to git. The sealing key is backed up outside the cluster.
- CloudNativePG runs Postgres from a few lines of YAML.
- Namespaces with quotas (
media,apps,infra, and one per big app), so one app can’t starve the others of memory. - NFS from the Samba server instead of CIFS. Pods mount the shares directly and retry until the server is up, which fixes the boot-order problem.
What moved where#
| Old VM | Now on k3s | Notes |
|---|---|---|
| Cadence VM | stacks/media/cadence | Postgres via CloudNativePG. CI commits the new image tag to git instead of SSHing in. |
| Jellyfin VM | stacks/media/jellyfin | Fresh install, media mounted read-only |
| Small apps VM | workloads/… | Each app became a few lines of values.yaml |
| File share VM | gone | Files moved to the Samba server. The speed test became LibreSpeed on the router. |
| Traefik VM | k3s Traefik | Routes to the VMs that stay, through ExternalName Services |
What stays as VMs#
Not everything belongs in the cluster:
- The Samba file server, which owns the disks.
- The CI VM, with the registry and runner.
- Home Assistant.
- The trading server: TimescaleDB plus the services and UI of a trading app I’m building.
- Two MT5 VMs. MetaTrader 5 is a Windows GUI app with no headless mode, so each VM runs it under Wine on a minimal desktop, supervised by systemd so it comes back after a crash or reboot without anyone logging in. That’s a poor fit for a pod.
- Pi-hole runs on its own hardware.
Their web UIs still sit behind the same Traefik. Each one is a Kubernetes ExternalName Service that points at the VM, plus an Ingress rule. So proxmox.lab.paulustech.uk still works, served by the cluster.
Deploying is a git push#
Cadence is the first app on the full pipeline:
- Push to
main. - The runner on the CI VM builds the images and pushes them to its registry, tagged with the commit SHA.
- CI commits that tag into the GitOps repo.
- Argo CD sees the commit and rolls out the new pods.
I wrote up the full recipe, including a multi-service app with Keycloak and Postgres, in Deploy an app to the homelab with one git push.
Backups#
- Nightly at 02:00, Proxmox backs up the whole k3s VM to an NFS share on the Samba server and keeps seven days. It uses the guest agent to freeze the filesystem first, so the backup is consistent. The first run was 13 GB and took about 8 minutes.
- Nightly at 03:15, a CronJob dumps Cadence’s database to an NFS share and keeps 14 days.
Gotchas#
These are the things that cost me time, roughly in the order I hit them.
- Take backups before you migrate. I deleted Cadence’s old VM before taking a database dump, and there was no Proxmox backup job yet. Cadence’s database was gone. Consolidating also makes the blast radius bigger: one VM now holds everything.
- Ubuntu’s installer only uses half the disk. It leaves about 50% of the LVM volume group unallocated. When the OS disk fills, kubelet hits DiskPressure and evicts every pod. Fix it before installing anything:
sudo lvextend -r -l +100%FREE /dev/ubuntu-vg/ubuntu-lv. - Never put SQLite on NFS. It corrupts. Jellyfin keeps its config on a local-path volume. Only the media itself comes over NFS.
- Pi-hole CNAMEs can’t be wildcards.
*.lab…in the Local CNAME page is silently ignored. The wildcard has to go inmisc.dnsmasq_lines. - The wildcard leaked over IPv6.
address=/lab.paulustech.uk/<k3s-ip>only answers A (IPv4) queries. AAAA queries went upstream and came back with Cloudflare’s public IPv6 addresses, which browsers prefer. Addinglocal=/lab.paulustech.uk/keeps the whole zone local:["address=/lab.paulustech.uk/<k3s-ip>","local=/lab.paulustech.uk/"] - cert-manager’s DNS self-check. Pi-hole doesn’t serve the public zone, so cert-manager’s check that the challenge record exists never passed. Point it at
1.1.1.1for that check. - A plain-HTTP registry needs config on the node. containerd refuses an
http://registry until it’s listed in/etc/rancher/k3s/registries.yaml. - A quota needs a LimitRange. Once a namespace has a ResourceQuota, every pod must declare its resources. A LimitRange fills in defaults for pods that don’t.
- Quotas count limits, not usage. Jellyfin was refused because the
medianamespace’s memory limits added up past the quota, even though actual use was far lower. - Argo CD skips EndpointSlices. My first attempt at routing to the VMs used a Service plus a hand-written EndpointSlice. Argo CD excludes EndpointSlices from sync by default, so Traefik returned 503.
ExternalNameServices work, once you enableallowExternalNameServicesin Traefik. - k3s Traefik doesn’t redirect HTTP to HTTPS out of the box. You set that with a
HelmChartConfiginkube-system, which is how you customise any of k3s’s bundled charts. - ReplicaSets pile up. By default every Deployment keeps 10 old ReplicaSets.
revisionHistoryLimit: 1keeps just the previous one. Git is the real history anyway. - Use the right IP. My NFS export for Proxmox backups was refused because I’d used an old IP for the host.
showmount -eand the exports file are your friends. - Plan for CPU-only transcoding. There’s no usable GPU: the GT 710 has no useful NVENC, and the Ryzen 5600 has no iGPU. Eight vCPUs manage about two or three 1080p transcodes at once. The real fix is to avoid transcoding in the first place: direct-play clients, 1080p quality caps, text subtitles.
kubectl get appshows the wrong thing. Rancher defines its ownappsresource. Usekubectl get applications.argoproj.io.
Rebuilding from scratch#
The test of “disposable” is being able to rebuild. The target is under 30 minutes:
- A new Ubuntu VM with the data disk attached, then install k3s.
- Restore the Sealed Secrets key:
kubectl apply -f sealing-key.yaml. - Install Argo CD with Helm, give it a read-only token for the repo, then
kubectl apply -f bootstrap/root.yaml. - Wait. Argo CD recreates everything else from git.
- Restore the database dumps.
Or, quicker, restore last night’s Proxmox backup of the whole VM.
Update: remote access moved to the router#
2 December 2026
Remote access ran on a Tailscale subnet router: a small VM on the same Proxmox host, giving my own devices a way into the home network. On 2 December the host’s network card hung, and remote access went down with everything else.
- The card: an onboard Realtek RTL8168h on the Linux
r8169driver. It loggedtransmit queue 0 timed outevery few seconds, and every VM dropped packets. - A reboot didn’t clear it. The card stayed hung until the power was physically pulled. It had already failed twice in the fortnight before.
That’s the single point of failure from What’s next, arriving early. So the gateway moved to the one box that has to work for the house to have internet at all: the OpenWrt router, a Raspberry Pi. If Proxmox dies, the router can still reach the network, and I can still reach the router.
Docker, not the OpenWrt package#
OpenWrt has a native tailscale package. I run Tailscale as a Docker container instead, the only one on the router. It can be upgraded, recreated or removed without touching or restarting the router itself. The setup is the standard one from Tailscale’s Docker guide:
services:
tailscale:
image: tailscale/tailscale:<version> # pin a version
network_mode: host # a subnet router needs the host's network
restart: unless-stopped
cap_add: [NET_ADMIN, NET_RAW] # not privileged
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ./state:/var/lib/tailscale # the login lives here
env_file:
- path: .env # TS_AUTHKEY, for the first login only
required: false
environment:
TS_AUTH_ONCE: "true"
TS_STATE_DIR: /var/lib/tailscale
TS_USERSPACE: "false"
TS_ROUTES: 192.168.1.0/24 # your LAN
TS_EXTRA_ARGS: --accept-dns=false
TS_DEBUG_FIREWALL_MODE: nftables # OpenWrt's firewall is nftables
It’s a subnet router, not an exit node: my devices can reach the home network from anywhere, but their internet traffic doesn’t go through it.
Gotchas from the move#
- Growing the SD card’s partition changed its disk ID. The OpenWrt image leaves most of the card unused, and Docker needs room. Growing the root partition with
partedgave the card a new disk ID, but the Pi boots withroot=PARTUUID=<disk-id>-02. After the reboot it hung waiting for a partition that no longer existed, and the whole house had no internet for about 20 minutes. The fix was editingcmdline.txtandpartuuid.txton the card from a PC. After any partition change, check the disk ID before rebooting. - Keep Docker away from the router’s firewall. By default dockerd writes its own iptables rules. Turn
iptablesandip6tablesoff in/etc/config/dockerdso OpenWrt’s firewall stays in charge, then givetailscale0its own firewall zone that forwards tolan. - The container can’t set
src_valid_mark. Set it on the host:net.ipv4.conf.all.src_valid_mark=1in/etc/sysctl.d/. - Log in with a one-off auth key. Without one, the container restarts every 60 seconds with a new login link, so every link expires before you can use it. Put a one-off key in
.env, start the container, then empty.envagain. The login stays in./state. - Disable key expiry for the gateway. Otherwise it logs itself out after a few months, at the worst possible moment.
- Lock down who can use the routes. By default every device in a tailnet can reach everything a subnet router advertises. Restrict the routes to your own account in the tailnet’s access controls.
What’s next#
- Practise the restore. A backup you’ve never restored is a hope, not a backup.
- Replace the network card. The onboard Realtek is the weak link. An Intel card (i210 or i350) is the real fix for the hangs.
- The single point of failure. Remote access no longer depends on the Proxmox host, but everything else still does, and NFS lives on a VM on that host. A second physical node, probably an Intel N100 mini PC with hardware transcoding, only helps once storage is off that host too. That’s a project for later.