Homelab v2 Rebuild
Goal
Rebuild the homelab from scratch on the same machines, following the v2 plan: a kubeadm cluster with three stacked control planes behind a kube-vip address, Cilium instead of Flannel, kube-proxy and MetalLB, the Gateway API instead of ingress-nginx, and the GTX 1070 laptop as a dedicated, tainted GPU worker for Jellyfin transcoding and local AI.
Setup
| Host | Machine | v2 role | Status |
|---|---|---|---|
k8s-cp-01 |
Dell Latitude E7440 | Control plane 1 | Ready (2026-11-22) |
k8s-gpu-01 |
ASUS ROG G702V, GTX 1070 | GPU worker, tainted; runs the media stack until k8s-cp-03 joins |
Ready (2026-11-22); GPU shared ×4 (2026-11-25); the nvidia-smi "freeze" was memory, fixed with containerd's open-files limit (2026-11-25) |
k8s-cp-02 |
ASUS Tower | Control plane 2 + Tailscale subnet router | Needs an SSD first |
k8s-cp-03 |
MacBook Pro 15" i9 | Control plane 3 + main workloads | Needs a USB-C Ethernet adapter |
k8s-data-1 |
HP ProLiant | TrueNAS: NFS and S3 | NFS up and reachable from the cluster; etcd backups land on it (2026-11-23); single disk, mirror to add |
Provisioning: Debian 13 and the Ansible playbooks in the homelab repo, run from the M1 Mac. The old state is to be tagged v1 before the v2 changes are committed.
Steps and findings
2026-11-21: GPU worker prepared
-
Name. The ROG used to be
k8s-cp-01. Its role changed, so it was renamedk8s-gpu-01before joining, and moved to a newgpu_workersinventory group (see kubeadm Uses the Hostname as the Node Name, So Name a Node Before It Joins and Workloads on the Only Control Plane Can Starve etcd, So Heavy Nodes Should Be Workers).08-install-nvidia.yamlnow targets that group. -
Access (
00,01). SSH key pushed with--ask-pass;sudoinstalled throughsuwith the root password; passwordless sudo forleva. -
OS bootstrap (
02). Hostname set, swap off,overlayandbr_netfilterloaded.swaponwas "not found" over plain SSH because/usr/sbinisn't on a normal user'sPATH;/proc/swapsworks instead. -
containerd (
03). The first run was green but left containerd without the systemd cgroup driver: Debian ships a 9-line config stub. Fixed in the playbook and asserted (see The Playbook That Said ok). -
Kubernetes packages (
04). The pin moved from the unsupported v1.31 to ak8s_minor_versionvariable set tov1.36; installedv1.36.6, all three packages held (see pkgs.k8s.io Has One Repository per Minor Version, So the Repository URL Is the Version Pin). -
NVIDIA (
08). Secure Boot already disabled. Debian's driver550.163.01(CUDA 12.4) sees the GTX 1070.nvidia-ctkmadenvidiathe default runtime through a drop-in file, soconfig.tomlstill saidruncwhilecontainerd config dumpshowednvidia(see containerd Merges Drop-in Files Through imports, So config dump Shows the Real Config). The device-plugin restart handler failed as expected (no cluster, no kubeconfig on a worker) and was ignored. -
sqv exception review. The move to v1.36 triggered the review in the time-boxed exception post. With the real
sqvrestored and the cached Kubernetes lists deleted,apt-get updateverified the v1.36 repository. TheInReleasesignature packet is version 4, so upstream re-signed the repository;dpkg --verify sqvis clean. Exception closed; the wrapper tasks were removed from playbooks04and07, which now restore the realsqvwherever the wrapper remains. The review also found that the Ansible version had left the wrapper in place permanently, unlike the script the exception record described. -
Duplicate apt sources. Playbook
08had added a full Debian sources line that duplicated the base sources (apt warned "configured multiple times"). It now adds onlycontrib non-free, removes the old file, holds the driver, and asserts the NVIDIA runtime incontainerd config dump.
2026-11-22: first control plane, Cilium, GPU worker joined
- Decisions. Three stacked control planes, started as one: the cluster is initialised against the kube-vip address, so
k8s-cp-02andk8s-cp-03can join later without new certificates. They will join on the same day, because two etcd members tolerate no more failures than one (see Two etcd Members Tolerate No More Failures Than One, So Go from One Control Plane to Three). The media stack runs on the ROG until the MacBook Pro joins, then moves there: every media deployment selects the node labelhomelab/media=trueand tolerates the GPU taint (see A Toleration Lets a Pod onto a Tainted Node, It Doesn't Send It There). - The Dell was read-only on every boot, since May.
kubeadm resetfailed withread-only file system.fscksaidclean, SMART was healthy, and the kernel log of earlier boots had no I/O errors. The cause: the root line in/etc/fstabwas commented out, so systemd never remounted/read-write (see With No Active Root Entry in fstab, systemd Leaves the Root Filesystem Read-Only on Every Boot). Playbook02's swap regex had done it on 2026-05-30:\smatches newlines, so the pattern ran from the/entry into the installer's# swap was oncomment (see In a Regex, the Whitespace Class Also Matches Newlines, So One Pattern Can Span Two Lines). The same bug had commented out/boot/efion the ROG. Fixed both, re-rangrub-install, rewrote the regex and added an assert that/keeps an active entry. The assert itself failed at first: ansible-core 2.19 rejects a conditional that evaluates to a string, andregex_searchreturns the match; theis searchtest returns a boolean. - Old cluster state on the Dell. Kubernetes 1.31 (held), Debian's own
kubectl 1.32.3+ds-2, the v1.31 repository and thesqvwrapper: purged before playbook04, which only adds a repository line and would have kept 1.31. Flannel's config survivedsudo rm -rf /etc/cni/net.d/*because the glob expanded in my non-root shell (see A Shell Glob Expands Before sudo Runs, So sudo rm on a Root-Only Directory Can Delete Nothing). - Control plane.
kubeadm initv1.36.6 against192.168.1.50:6443, kube-proxy skipped, kube-vip as a static pod (--controlplane --arponly). Warnings kept for later: containerd 1.7.24 lacks the CRIRuntimeConfigmethod, which the kubelet needs from Kubernetes 1.37; the pause image was3.8instead of3.10.2. - Cilium 1.20.5 via Helm:
kubeProxyReplacement=true,k8sServiceHost=192.168.1.50(no kube-proxy to serve thekubernetesService),operator.replicas=1while one node is schedulable. CoreDNS then hung inContainerCreating: Debian's containerd searched/usr/lib/cni, and the playbook's symlinks only covered plugins present when it ran, notcilium-cni(see containerd Looks for CNI Plugins in One Directory, So a Path Mismatch Blocks Pod Networking). Playbook03now setsbin_dir = "/opt/cni/bin"and the pause image. - The fix didn't reach the ROG. Its NVIDIA drop-in holds a full copy of the CRI section, merged after
config.toml(see containerd Merges Drop-in Files Through imports, So config dump Shows the Real Config).03now edits drop-ins too and asserts oncontainerd config dump. kubeadm joinfailed preflight:ip_forwardwas 0 after a reboot. Ansible'ssysctlmodule had written/etc/sysctl.conf, which Debian 13 no longer reads (see Runtime Kernel Changes Last Until Reboot Unless Written to Their Configuration Directory). Swap was back too. Sysctls moved to/etc/sysctl.d/99-kubernetes.confandswap.targetis masked; both held across a reboot. The ROG then joined, andlabel-nodes.shtainted and labelled it. Join token deleted.
2026-11-23: storage checked, etcd backed up
- TrueNAS is up, and the v2 cluster can use it. Checked one layer at a time, so a failure would point at its layer: ping from the Mac;
showmount -efrom both nodes lists the export; a host mount on each node accepts writes as root; then a pod on each node (pinned withnodeName, the GPU taint tolerated onk8s-gpu-01) mounted the share through an inlinenfs:volume and wrote to it. No provisioner is needed for that last test. - Three false alarms on the way, all on the client side. The macOS
showmountreportsProgram/version mismatchbecause it asks mountd for an older version than TrueNAS offers. Over SSH,showmountwas "not found" because/usr/sbinisn't on a regular user's PATH in a non-interactive shell (the same trap as Ansible become_method su Runs a Non-Login Shell Without sbin in PATH). Andkubectltriedlocalhost:8080because no kubeconfig was loaded in that terminal. - The share already has the right shape.
downloads/,movies/andtv/sit on one export, and 201 of the 210 files over 100 MB in the libraries are hardlinks intodownloads/(see A Hardlink Can't Cross Mounts, So Downloads and Media Libraries Must Share One Mount). The v2/datalayout is then a matter of renames inside the dataset. - Findings for later. The export allows every host, doesn't squash root, and most folders are
777: restrict it to the LAN. The pool is one 2 TB disk, and the October snapshot already showed 82 % used, past the point where ZFS slows down: order the mirror disk.downloads/is writable only by UID 1000, so the media containers needPUID/PGID=1000. - etcd backups before anything else joins. With one control plane, the whole cluster state sits on the Dell's SSD. Playbook
10-etcd-backup.yamlinstalls a systemd timer (every 6 h) that takes a snapshot, checks it withetcdutl, and writes one bundle to/var/backups/etcdand to a new TrueNAS share (k8s-data-1/backups, limited to the control-plane IPs, root not squashed so the job can write).make etcd-pullkeeps a third copy on the Mac, because the pool is one disk. The bundle carries/etc/kubernetes/pkitoo: a snapshot alone can't rebuild a control plane (see An etcd Snapshot Alone Can't Rebuild a kubeadm Control Plane, So Back Up the PKI with It). - The first run proved the fallback. The TrueNAS share didn't exist yet, so the automount failed; the job kept the local snapshot, exited with its "NAS copy failed" status, and the playbook's final assert caught it. After creating the share: 348 keys, 672 KB per bundle, checksum OK on the NAS. Firefox couldn't open the TrueNAS UI on the way, while
curlcould: macOS Local Network permission. - A backup counts once a restore works.
etcd-restore-drillrestored the bundle into a throwaway etcd on loopback and compared it with the live one: 347 keys under/registry/, 5 namespaces and 2 nodes on both sides. The live etcd is only read (see Back Up and Restore etcd on a kubeadm Cluster). - The timer runs it without me. Every bundle so far had come from the playbook starting the service by hand. In
systemctl list-timers,LASTfills in only when the timer itself fires: it showed 18:15:08 CET, the 18:00 slot plus the random delay, and the bundle…T171508Z(UTC) was on the node, on TrueNAS with a matching checksum, and on the Mac aftermake etcd-pull. The concepts behind it, written up the same evening: A Backup Bundle Packs Everything One Restore Needs into a Single File, A Checksum Proves a Copy Is Identical, Not That the Backup Restores, An etcd Snapshot Rolls the Whole Cluster Back, So Restore Only When Re-Applying Can't Fix It, A Certificate Authority Is the Key Everyone Trusts, So a New One Invalidates Every Certificate It Signed and Unix Permissions Grant Read, Write and Execute Separately to the Owner, the Group and Everyone Else.
2026-11-24: Argo CD, Cilium adopted
- GitOps before more workloads. Argo CD v3.6.2 (chart
argo-cd10.18.2) installed once with Helm, then put under its own management. A root Application, applied by hand, creates the others fromk8s/argocd/apps/; it syncs automatically but never prunes, and the children (argocd,cilium,media) sync by hand after a diff (see In an App of Apps, Only the Root Is Applied by Hand, So Its Sync Policy Decides What a Commit Can Delete). Repository access is a read-only GitLab deploy key in a labelled Secret. - The CNI changed hands without a restart. Cilium's values went into Git exactly as
helm get valuesreported them, with the same chart version and release name, so the render matched the running objects. Hubble's certificates are generated by Helm on every render: ignored in the diff and kept on sync. With an etcd snapshot taken first, the diff showed only Argo CD's tracking annotation, the sync took 2 s, and the four Cilium pods and the operator kept their 35-hour age (see Argo CD Can Adopt a Running Helm Release When It Renders the Same Chart, Values and Release Name). - Describing before deploying. The media stack is registered but stays
OutOfSync/Missing: its manifests still expect v1's ingress controller, LoadBalancer IPs and storage classes, and the GPU device plugin isn't in yet. - Small snags. No kubeconfig in a new terminal (kubectl tried
localhost:8080), fixed for good with amise.tomlthat setsKUBECONFIGinside the repo; theargocdCLI to install; a port-forward already running in another terminal.
2026-11-25: GPU shared, then the node froze
- The device plugin through Argo CD. NVIDIA's chart (0.20.0) as a fourth Application, values in Git, manual sync. The chart's default affinity only matches nodes labelled by Node or GPU Feature Discovery, which don't run here: the DaemonSet would have installed and run nowhere. Its affinity now selects my own
homelab/gpu=nvidialabel. The diff showed only new objects; after the sync the GPU node advertisednvidia.com/gpu: 4. - Sharing one card four ways. Time-slicing with four replicas, keeping the resource name Jellyfin already requests and rejecting requests for more than one share. The four pods take turns but share all 8 GB, so the count is an upper bound, not a guarantee (see Time-Slicing Lets Pods Share a GPU but Not Isolate Its Memory).
- Then the smoke test froze the node, six times. Two test pods ran
nvidia-smi; the laptop stalled: ping answered, SSH didn't, the node wentNotReady, and only the power button brought it back. No trace: the journal stops a second after the container starts, the lockup and hung-task panics I added never fired, netconsole to the Mac received nothing. One variable per power cycle: the host runs the same command three at a time without trouble,execin the device plugin's own container works,nvidia-smi -Lworks from the failing container, and the full query from an ordinary container freezes, with or without the device plugin, at start or later, with extra privileges too. So the plugin, time-slicing, persistence mode, capabilities and library versions are ruled out; the image and a second GPU process remain. - It worked in v1, but not the same way. In June the plugin, a CUDA sample and Jellyfin's NVENC ran on this laptop; none of them ran the full
nvidia-smiquery in a container. The ROG was reinstalled for v2, so every package is new: a newer container toolkit, annvidia-modprobefrom a later driver branch, a newer kernel. Next: a real CUDA workload first, then roll back one piece at a time. - Small snags. The Argo CD tunnel wasn't running, then its token had expired; persistence mode read
Disabledas my user andEnabledas root; the forced power-offs left the EFI partition dirty (fsck.vfatcleared it).
2026-11-25 (evening): the freeze was memory
- Check the instruments first. A test script (
homelab/scripts/gpu-freeze-test.sh) checks before each test that netconsole really reaches the Mac. It didn't, and never had: without a target MAC it sends broadcast frames, which the box doesn't forward to Wi-Fi. With the MAC set, a marker line arrives. Every GPU step now runs under a watchdog that force-deletes the pod if the node stops answering. - Real workloads pass. The CUDA vectoradd sample and Jellyfin's ffmpeg (NVENC encode, CUDA decode, 1080p at ~300 fps) both work. So does the full
nvidia-smiin a fresh pod with the device plugin's image. The image matters, not the driver. - The seventh run didn't freeze. Same hang after the header, but the pod came back
OOMKilledwith no memory limit:nvidia-smiat 15.4 GB resident, 54 GB virtual, three seconds after it started. Every "freeze" had been the node thrashing out of memory: no swap, ping fine, user space starved, nothing for the kernel to log. - The cause. containerd 1.7 gives containers an open-files limit of 1073741816; the persistence-mode column makes NVML talk to
nvidia-persistenced, and that path allocates by the limit (a known NVIDIA bug). In a 1 GiB-limited pod the persistence query alone gets killed, andulimit -n 1024makes the full table work. See containerd 1.7 Gives Containers a Billion-File Limit, So Code Sized by It Can Exhaust a Node's RAM. - The fix. A containerd drop-in,
LimitNOFILE=1024:524288, in playbook03with an assertion, applied to both nodes. New containers get 1024 / 524288; the original repro and the two-pod time-sliced test print the full table. Written up as a post-mortem: The GPU Freeze That Was Out of Memory.
2026-11-25 (late): the media stack written, not deployed
- Storage without the mirror. Dynamic volumes on TrueNAS wait for a second disk, so the media files get one static NFS volume, mounted at
/datain every pod: downloads and libraries on the same filesystem keep imports as hardlinks (A Hardlink Can't Cross Mounts, So Downloads and Media Libraries Must Share One Mount). The v2 layout is a set of renames inside the existing dataset, after a snapshot: copying would break the hardlinks, and the pool is too full anyway. App configs stay on the node's disk with the local-path provisioner (SQLite Needs Reliable File Locks, So Its Database Belongs on Local Disk, Not on NFS), patched so its helper pods can run on the tainted GPU node and deleted volumes keep their data. - LAN addresses and the Gateway. Cilium hands out LoadBalancer IPs from a pool kept out of the DHCP range and answers ARP for them on wired NICs only; one Gateway serves every web UI by name. Names live under
home.arpa, since.localbelongs to mDNS. Order matters: the Gateway API CRDs must exist before Cilium's Gateway controller starts. - Memory limits everywhere. After the out-of-memory "freeze", every media container has a request and a limit (Jellyfin 4 GiB), and a LimitRange gives any container that forgets one a default. Limits add up to about 11 of the laptop's 15 GiB.
- Small corrections to v1. Jellyfin no longer uses the host network (it gets its own LAN IP) and no longer sets
NVIDIA_VISIBLE_DEVICES=all, which bypasses the device plugin. Jellyseerr becomes Seerr. qBittorrent ships switched off until it can run behind a VPN. - Nothing is synced: the bring-up is a runbook in four phases (
homelab/docs/runbooks/media-stack-bringup.md).
2026-11-25 (night): storage ready for the media stack
- The pool had room after all.
zpool listshowed 67 % used, not October's 82 %, so the mirror disk is about redundancy now, not space. - Snapshot, then rename. A ZFS snapshot first (free until files change), then the v2 layout made of renames inside the same dataset. The count of hardlinked library files was 201 before and after: the imports' hardlinks survived (A Hardlink Can't Cross Mounts, So Downloads and Media Libraries Must Share One Mount). Ownership went to the apps' user, with setgid folders so new files keep its group, and both nodes wrote into the share as that user.
- Something that didn't belong. The listing before the renames showed an 877 MB Windows executable with a random name among the downloads: a fake release, linked to nothing. Deleted; the download client will exclude executables when it runs again.
- App configs get a home. The local-path provisioner synced through Argo CD; a test volume was created on the GPU node by a helper pod that tolerated its taint, and its data stayed on disk after the volume was deleted (Retain) until I removed the folder.
- Snags. Argo CD hadn't compared the root app against the new commit, so the new apps only appeared after a hard refresh; the port-forward's
broken pipemessages were noise. The TrueNAS shell isn't root (sudo), and its clock is on US Pacific time.
2026-11-26: the share locked down
- LAN only, root squashed. The media share now accepts only the home network, and a client's root becomes
nobody: a write as the apps' user works from both nodes, a write as root is refused. The etcd backup share keeps root access, on purpose. - Two mistakes on the way, both visible in one file. Every mount was refused at first: the network had been typed without its first digit. Then root still wrote: TrueNAS had kept the share's root mapping in its database although the dialog's fields looked empty, and the export file it generates said so. Reading the stored values through its API, then setting the mapping explicitly, fixed it. Lesson: check what the server actually exports, not what the form shows.
2026-11-26 (night): addresses on the LAN, one entry point, and the media stack
- Change the network carefully. An etcd snapshot first, then the Gateway API definitions, then Cilium's new settings: answering for LAN addresses and serving as the Gateway. The diff held one real datapath change the chart adds for its proxy (Service addresses translated per packet inside pods); the sync restarted nothing, so I restarted the operator and then each node's agent in turn, and checked health, DNS and Service traffic from a pod before going on. The health report looked wrong for two minutes: its first probe had run before its own endpoint was up.
- Addresses and names. A pool of twenty LAN addresses, kept out of the router's range; one Gateway on a fixed address, one Jellyfin address for TVs. From the Mac, the Gateway's
404proved the whole path before any app existed. - The stack. One sync created everything; nine apps came up on the GPU node, each with a memory limit, and every web interface answered by name after two fixes: one app was killed at start-up by its limit while it installed Calibre (limit raised after measuring), another refused requests for a hostname it didn't know (SABnzbd's whitelist).
- The GPU, really. Nothing showed on the GPU during playback, because the Mac's browser plays HEVC and Jellyfin only copied the video. A manual transcode of a 4K 10-bit film ran at 11.6× real time once the frames were converted to 8-bit on the GPU. Then Jellyfin itself turned out to decode on the CPU (about seven cores busy): its saved list of codecs to decode on the GPU lacked HEVC. With the list fixed, decode, scaling and encode all run on the card, at under one core. Lesson: check what an application stored, not what its form shows (the second time this session, after the NFS share).
2026-11-26 (evening): the apps wired, one request end to end
- Wiring as code, secrets kept out. A script now does everything that needs only the apps' own keys: it reads them inside the pods, sets folders, root folders, the download client, the indexer proxy and the app links, reads each value back and lists what is left. The two account secrets (Usenet provider, indexer) are prompted for, hidden and never stored by the script; reading them from a Kubernetes Secret waits for SOPS or External Secrets. One setting answered "OK" without being stored until the call was sent the documented way (POST): reading back caught it, the third "check what is stored, not what the answer says" of this rebuild.
- Accounts. The first provider's account was refused by its servers (also in SABnzbd's own test, so not the script); a second provider worked on the first try. Setting its full connection count then made every extra test fail with "too many connections": ~20 is plenty for a home line.
- The request. Seerr (wizard with in-cluster names; the workstation names only as links for the browser) → Sonarr → the indexer through Prowlarr → SABnzbd → import → Jellyfin. The import had link count 1 and left nothing behind, which I first read as a failed hardlink: it is how Usenet imports work, a move that is an instant rename on the one mount; hardlinks are for torrents that keep seeding. A test file then proved hardlinks across the two trees (same inode, link count 2), as root could not even write there: the share squashes root, so hand-made checks run as the apps' user.
- Two traps found on the way. The apps' "no login for local addresses" option would have meant no login at all, since behind the Gateway every client arrives from a pod address. And Jellyfin doesn't notice files that other pods write over NFS, so the importers now tell it after each import.
- Memory. SABnzbd's counter sat at its 1 GiB limit during the download, but 902 MiB of it was page cache of the files it wrote: 108 MiB of its own, no kill. Judge I/O-heavy pods by anonymous memory before raising a limit. (Corrected 2026-11-27: true for one download, not for three; see below.)
2026-11-26 (late): the library cleaned, full-disc copies off
- Fake releases. Eleven ~1 GB Windows executables named like real episodes sat in the old download folder; one had been found the night before, and why that check missed these is still open. Deleted; harmless on Linux, but the share is also opened from other machines. The space only comes back when the pre-migration snapshot goes, since a snapshot keeps every block it saw.
- Link count told me what I could delete. Almost every file in the old download folder had link count 2: already in the library as a hardlink. Comparing inode numbers between the two trees left one episode and a few bonus features that existed only there; I linked those into the library, then cleared the folder. Deleting one name of a hardlinked file costs the other name nothing.
- Library tidy-up by hand. Doubled extensions, a season in the wrong folder, a folder named
Season_2: each fixed with a dry run first (echo mv …), then the real run. Gaps go to the apps' "missing" list rather than a manual hunt. - Full-disc copies off. Four films took ~150 GB as untouched Blu-ray streams. Quality profiles now refuse them and 1080p is capped by size; the four came back at ~33 GB. The apps never downgrade, so each old file had to be deleted before a search would replace it, and two of the four weren't tracked by the app at all (files from the old cluster the media server had found by itself). One profile refused the change because its target quality was the one being removed.
- Filters have a scope. Blocking executables in the download client would also block software I download on purpose, so the rejection belongs in the two apps that only fetch films and series. Same for the torrent client later. And until the torrent client runs behind a VPN, both apps only accept Usenet releases.
- The queue lied, briefly. Items "unavailable" next to the same release downloading were grabs parked while the app didn't answer, not a second broken client; I first blamed the stopped torrent client before reading the protocol field. Read the field before the theory.
2026-11-27: killed at the limit I had called safe
- The kill. The download client had restarted once, at 23:02 the night before:
OOMKilledat its 1 GiB limit, an hour after I had written that its full memory counter was harmless cache. Three jobs were running, one of them unpacking. The node's kernel log settled it: the unpacker triggered the kill inside the container's own limit, the client's program memory was ~420 MiB (four times my one-download measurement), and the rest was cache of writes to NFS that can't be freed before it's written back. Kubernetes kills the whole container when one process goes. Limit raised to 2 GiB through Git and Argo CD; the client's article cache set explicitly, since it sizes itself from the node's RAM (A Container's Memory Limit Counts the Files It Writes, So Low Program Memory Doesn't Mean Headroom). - What survived. The film being unpacked had imported after all despite the warnings; a new search was refused because the file already met the profile's target. Two other films had failed for a different reason: parts missing on the provider, likely taken down. Retrying can't fix that; blocklisting the release and searching for another can.
- Read the evidence, then the theory. The first explanation for "wasn't grabbed by the app" was a manual retry; the timing points at the restart instead (one of the films was in the queue at 23:00). Kept as likely, not confirmed. Same habit as the day before: the kernel log turned "probably memory" into a number.
- GitOps in practice. The fix was a one-line commit, a manual sync, and a check of the running pod's limit. The sync also reset a Jellyfin Deployment that had drifted from Git without my noticing: something to explain before the next sync.
Next
- After the 2026-11-27 kill: re-search the failed films and episodes (another release), check the drifted Jellyfin Deployment, raise or keep the 1080p profile's upgrade target, regenerate the download client's keys.
- Finish the media wiring: a film end to end, LazyLibrarian and Audiobookshelf, season folders by default; the account secrets from a Secret instead of a prompt.
- metrics-server as an Argo CD app; cert-manager for HTTPS on the Gateway; LAN DNS so other devices get the names.
- Check the router's DHCP range against the address pool; destroy the TrueNAS snapshot after a few good days.
- Eviction thresholds (or swap) on
k8s-gpu-01; remove or codify the hand-made lockup-panic sysctls. - A VPN sidecar and a secrets solution before the torrent client runs; then torrents back on in the apps' delay profiles.
- The download policy (no remux, size cap, delay profiles) into the wiring script; fill the series gaps; import the old films the app doesn't track.
- A daily launchd job for the Mac copy of the etcd backups; a restore drill each month. TrueNAS: timezone, mirror disk, then democratic-csi; back up the config volumes.
Controls verified
- SSH key login works; password prompts no longer needed for SSH.
-
sudo -n truesucceeds forleva. - Swap off;
br_netfilterloaded; hostnamek8s-gpu-01. -
containerd config dump:default_runtime_name = "nvidia",SystemdCgroup = trueon both runtimes. -
kubeadm version=v1.36.6;kubelet,kubeadm,kubectlheld. -
nvidia-smilists the GTX 1070 (8 GB). - Real
sqvrestored; v1.36 repository verifies with the default Sequoia policy (fresh download). - Swap still off after a reboot, and
ip_forward = 1(k8s-gpu-01, 2026-11-22). -
/and/boot/efihave active fstab entries; playbook02asserts the/entry. -
containerd config dump:bin_dir = "/opt/cni/bin"and pause3.10.2on both nodes;nvidiastill the default onk8s-gpu-01. -
kubectl get nodes:k8s-cp-01andk8s-gpu-01Ready(v1.36.6); CoreDNS pods on Cilium IPs. -
k8s-gpu-01taintednvidia.com/gpu=true:NoSchedule, labelledhomelab/gpu=nvidiaandhomelab/media=true; join token deleted. - Swap and
ip_forwardchecked after a reboot onk8s-cp-01(2026-11-22); kube-vip re-added the VIP itself, so the hand-added address is gone. - TrueNAS NFS export listed, mounted and writable from
k8s-cp-01andk8s-gpu-01(2026-11-23). - Pods on both nodes mount the export through the kubelet (inline
nfs:volume) and write to it (2026-11-23). - SSH key login as
levaworks on both nodes (2026-11-23). -
etcd-backup.timeractive onk8s-cp-01; a bundle lands locally and on TrueNAS with a matching sha256 (2026-11-23). - Bundle copied to the Mac and its sha256 checked (
make etcd-pull, 2026-11-23). - Restore drill passed: key counts equal to the live etcd (2026-11-23).
- First timer-triggered run:
LASTset by the timer, bundle on the node, TrueNAS and the Mac, checksums OK (2026-11-23). - Argo CD reads the repo through the deploy key (
argocd repo list: Successful) (2026-11-24). -
argocd,ciliumandrootSynced and Healthy;mediaOutOfSync/Missing by design (2026-11-24). - Cilium adopted without a restart: same pod names and ages, both nodes
Ready,cilium statusOK (2026-11-24). - Device plugin Synced and Healthy; one pod
2/2 Runningonk8s-gpu-01;nvidia.com/gpu: 4allocatable (2026-11-25). - Plugin log: time-slicing config loaded (4 replicas),
nvidia.com/gpuregistered with the kubelet (2026-11-25). - A pod using the GPU runs without freezing the node: CUDA vectoradd, NVENC/NVDEC, full
nvidia-smiin a debian pod, two time-sliced pods at once (2026-11-25). - New containers get an open-files limit of 1024 soft / 524288 hard on both nodes; playbook
03asserts it on the service (2026-11-25). - Media share in the v2
/datalayout: 201 hardlinked files before and after the renames; snapshot taken first (2026-11-25). - Both nodes mount the media share and write to it as UID 1000 (2026-11-25).
- local-path provisions a volume on the tainted GPU node; Retain keeps the data after the volume is deleted (2026-11-25).
- NFS media share limited to the LAN, a client's root mapped to nobody: a write as UID 1000 works, a write as root is refused, from both nodes (2026-11-26).
- Cilium L2 announcements + Gateway API on, agents restarted one node at a time,
cilium-health2/2, Service traffic from a pod OK (2026-11-26). - The Gateway answers on its LAN address from the Mac (
404before routes, each app by name after) (2026-11-26). - Every media pod has a memory request and limit; a LimitRange covers any that doesn't (2026-11-26).
- Jellyfin transcodes on the GPU end to end:
-hwaccel cuda+scale_cuda+h264_nvenc, ~85 % CPU instead of ~690 % (2026-11-26). - A request flows from Seerr to the library: a TV series downloaded and imported as an instant move (link count 1, nothing left in the download folder), shown in Jellyfin (2026-11-26).
- A test file hardlinks across the download and library trees as the apps' user: same inode, link count 2 (2026-11-26).
- Sonarr, Radarr and Prowlarr require a login (Forms, enabled for every address) (2026-11-26).
- The download client's new 2 GiB limit is in Git and running: Argo CD Synced to the commit, the pod's
resources.limitsread back (2026-11-27). - SSH password authentication disabled.
References
- Kubernetes MOC - hub for Kubernetes notes.
- Prepare a Debian Node for Kubernetes - the manual version of playbooks
02to04. - Enable NVIDIA GPUs on a Bare-Metal Kubernetes Node - the manual version of playbook
08. - Bootstrap a kubeadm Control Plane and Join Workers - the manual version of the init script, Cilium and the join.
- Provide NFS Storage to Kubernetes - the export, node preparation and the layered checks used on 2026-11-23.
- Back Up and Restore etcd on a kubeadm Cluster - the manual version of playbook
10and the restore drill. homelab/docs/runbooks/etcd-backup-and-restore.md- the runbook for this cluster: layout, checks, drill, full restore.homelab/docs/runbooks/argocd-bootstrap.md- the Argo CD bootstrap, the Cilium adoption and rollback.homelab/docs/troubleshooting.md, "k8s-gpu-01freezes when a container runsnvidia-smi" - symptom, cause and fix;homelab/docs/postmortems/2026-11-25-gpu-node-oom.md- the full incident.- containerd 1.7 Gives Containers a Billion-File Limit, So Code Sized by It Can Exhaust a Node's RAM - the open-files limit and why it exhausted RAM.
- Time-Slicing Lets Pods Share a GPU but Not Isolate Its Memory - what four replicas share and what they don't.
- The Regex That Commented Out My Root Filesystem - the read-only Dell as a post-mortem.
- Deploy a Media Automation Stack on Kubernetes - the media stack procedure, step 6 rewritten from the 2026-11-26 run.
- A Hardlink Can't Cross Mounts, So Downloads and Media Libraries Must Share One Mount - why one mount, and why Usenet imports are moves.
- Homelab v2 — Architecture & Roadmap - the plan this lab follows.