| pick your distro, get ZFS on root
kldload — your platform, your way, free
Source

Disposable Infrastructure

When destroy-and-rebuild becomes free, you stop preserving things.

Most operators treat infrastructure as precious because rebuilding it is expensive — the rebuild takes hours, depends on procedures nobody’s tested, and risks losing state. So you protect what exists. You patch in place. You SSH-fix things at 2am. You don’t destroy and recreate, because you’re afraid the recreation won’t come back clean.

kldload changes that arithmetic. When destroying a Kubernetes cluster takes 20 seconds and rebuilding from scratch takes 5 minutes, the cost of recreation drops below the cost of protection. You stop preserving infrastructure that should be replaced. Test environments become per-PR instead of per-team. DR exercises become weekly instead of annual. Production stops meaning fragile.

This masterclass is the operator-side consequence of the substrate thesis (see First-Class Infrastructure for the substrate fundamentals). Same architecture, different lens: what changes about how you run a system when rebuild is no longer scary.

1. The operating model change

Pick any infrastructure operation you treat as “risky” today. Cluster rebuild. Database failover. Site cutover. Cross-region migration. The reason it’s risky isn’t the operation itself — it’s that you’ve never actually done the operation in production conditions, because each rehearsal would cost hours and might not come back clean.

Disposable infrastructure inverts that. The operations are the rehearsals. If your install procedure produces the same outcome as your DR procedure, and your DR procedure runs in 10 minutes on commodity hardware, then every install is a DR drill. There’s no separate runbook to drift from production. There’s no separate vendor to write a contract with. There’s no annual procedure-binder review with check boxes for things nobody’s tested in three years.

The mental shift is from “protect what exists” to “trust what regenerates.”

2. What “fast” actually looks like (measured)

The numbers below are wall-clock measurements on a kldload box running build #50, demoed in real time. Every number is observed, not extrapolated.

Operation Measured on kldload What it normally takes
Build 10 real-VM K8s worker nodes 1 min 48 sec 5–15 min on EKS/GKE/AKS; hours on-prem
Schedule 1000 nginx pods on them 1–2 min Comparable on any healthy cluster
Destroy the entire cluster 20 sec 5–30 min normally; most teams don’t even try
Rebuild from zero (CP + Cilium + 10 workers) 4–5 min 30–60 min on cloud, hours on-prem
Full die-and-rebuild loop ~7–10 min Hours-to-days everywhere else

If destroying a Kubernetes cluster takes 20 seconds, your DR architecture is fundamentally different. Not because kldload added a DR feature — because the operations other platforms treat as scary, rare, runbook-driven are operations kldload treats as “I’ll just do it again in front of you live.”

3. Real VMs, not containers

“Fast K8s nodes on one box” usually means kind or k3d — both of which use Docker containers as nodes. kldload doesn’t. Every node in the table above is a real qemu-kvm virtual machine with its own kernel, filesystem, boot, distribution. This matters more than it sounds.

kind / k3d (containers as nodes) kldload (qemu-kvm VMs)
Per-node boot timemilliseconds10–30 sec
KernelShared host kernelIndependent per VM
Test kernel modules (ZFS, eBPF, custom)×
Run different kernel versions across nodes×✓ — 6.6 + 6.12 + 6.19 simultaneously
Run different distributions per node× (all share host kernel)✓ — mix CentOS, Fedora, Ubuntu, Debian, Arch
Nested virtualization×
Live migration×✓ — qemu/libvirt native
Memory snapshot (not just disk)×
GPU / PCIe passthrough×
Security isolation boundaryProcess-level (namespaces)Hardware-level (VT-x/AMD-V)
RAM per node~5–50 MB~250–500 MB

The trade-off is honest: VMs cost more RAM and start ~20 seconds slower than containers. What you get back is every capability that depends on having your own kernel — and once you need any of them, containers can’t substitute.

The kldload demos require real VMs:

  • The OpenZFS test suite runs zfs-tests.sh against each VM’s own kernel — doesn’t work in containers.
  • klab’s multi-distro testing only means something because each VM is actually a different distribution running a different kernel — containers all share the host’s kernel, so “test CentOS + Fedora + Ubuntu” is fiction when it’s the same Linux underneath.
  • ZFS DKMS regression testing rebuilds the module against per-VM kernels.
  • WireGuard kernel module + Cilium eBPF behave differently per kernel.
  • Per-VM Secure Boot, MOK keys, custom kernel command lines — kernel features, kernel territory.

If your workload is “schedule pods, watch them run” — kind is fine and faster. If your workload touches the kernel in any way — you need real VMs, and kldload is the fastest way to get a fleet of them on one box. That’s the lane.

4. The USB is the DR vehicle

The same USB that installs kldload also exports it. kexport produces qcow2, raw, vmdk, vhd, OVA — pick the destination, get the format. Disaster recovery is just “install procedure, with a different output target.”

The recovery sequence on commodity hardware:

walk-to-best-buy DR sequence

# 1. Plug kldload USB into ANY commodity computer.
# 2. Boot live env (entirely in RAM).
# 3. In the installer, pick the template matching what was lost.
template = kldload-kvm                # or k8s, klab, zfslab, etc.
inventory = ./my-50-vm-fleet.yaml

# 4. Pick the output format for the destination.
format = qcow2                        # or raw / vmdk / vhd / OVA

# 5. Hit Export. kldload assembles the image from the live env.
#    No source system needed -- there isn't one anymore.
# 6. Once built, dd the result back onto the same USB.
#    The live env runs from RAM, doesn't care about overwriting
#    its own boot media.
$ dd if=output.qcow2 of=/dev/sdX bs=4M oflag=direct conv=fsync

# 7. Upload to the provider, boot one instance.
#    Autodeploy reconstitutes the environment in parallel.
$ aws ec2 import-image ...            # or Azure / GCP / OVH equivalent

About an hour later, the infrastructure shape is back. Be honest about scope: this rebuilds the shape (VMs, K8s, mesh, observability). The data in that infrastructure has to come from somewhere that survived — usually your syncoid → survivor site ZFS replication stream. The USB doesn’t magic up data that doesn’t exist. But infrastructure-shape recovery is the part that traditionally takes weeks; once it’s back, restoring state from a ZFS receive is bounded by network throughput.

Pair this masterclass with Backup & Disaster Recovery for the data-side coverage.

5. The three structural properties that make this work

Take any one of the three away and the disposability story breaks. All three are properties of the substrate, not features kldload adds on top:

1. The substrate is deterministic

Same template + same inventory produces byte-identical infrastructure, every time. ZFS holds the state; the install is just consuming a recipe. Reproducibility is not a feature — it’s a guarantee of the file system.

2. The output is format-agnostic

kexport produces qcow2, raw, vmdk, vhd, OVA, ISO — pick the provider, get the format. Same recipe boots on bare metal, AWS, Azure, GCP, OVH, a Pi cluster. No vendor lock at the disk layer.

3. The live env is RAM-resident

The USB can rebuild itself — dd a freshly-exported image onto its own boot media. No chicken-and-egg of needing somewhere to stage the new image first. The recovery vehicle is its own recovery target.

Most platforms have one of the three. A few have two. Almost none have all three together — which is why almost none of them can offer the “install procedure IS the DR procedure” pitch with a straight face.

6. The operator-behaviour consequences

Once destroy-and-rebuild is cheap, your team starts doing things differently. Not because anyone told them to — because the new economics make the new behaviours obviously right.

Before disposable infraAfter
Test environments are shared per-team because spinning a new one takes a day Per-PR test clusters — each pull request gets its own k8s cluster, lives 30 min, dies
DR exercise is annual, dreaded, “don’t touch production” DR exercise is weekly, because it’s the same procedure as your dev-cluster spin-up
Stuck cluster → SSH in at 2 AM and try to fix it Stuck cluster → destroy it, rebuild in 10 minutes, go back to sleep
Reproducing a customer bug requires their exact distro — usually impossible Spawn the customer’s exact distro + kernel as a klab golden in 2 minutes, repro on real metal
“Don’t change anything until we know what broke” “Try the change in a clone, destroy if wrong”
Production is fragile because rebuilding it would be a multi-day project Production stops meaning fragile, because production can be rebuilt in the same span as a coffee break

These aren’t culture changes you have to drive. They’re the rational responses to a substrate where the cost ratios are different. Cheap rebuild → casual rebuild → behavioural change. The platform shapes the operator, not the other way around.

7. What this isn’t

Worth being honest about scope — especially when the numbers sound too good. Disposable infrastructure is not:

Claim it ISN’THonest framing
“A complete DR product” It rebuilds the infrastructure shape, not the data. Data restoration is your replication policy’s job (see Backup & DR for that side).
“Faster than kind” Containers always win on pure speed. The pitch is comparable speed with real VMs. Different sport.
“A fleet OS” kldload is box-first. For multi-rack fleet provisioning, look at Talos + Sidero Omni. kldload boxes can federate via WireGuard + ZFS replication; the fleet orchestration isn’t the primary identity.
“Production-grade at hyperscale” Single-box, 10–50-node K8s territory. AWS at 1000-node scale wins on raw provisioning because they have a million machines ready. kldload wins in the “the box I have right now” lane.
“Free magic” Real VMs cost RAM (~250–500 MB per node). The 10-node cluster needs ~5 GB host RAM minimum. On a laptop, you fit 10–20 nodes comfortably; on a 64 GB workstation, 50+.

8. Where to go from here

Three follow-on reads if this changed how you think about infrastructure lifecycle:

First-Class Infrastructure

The substrate fundamentals — why the kernel is the foundation, not the runtime. This masterclass is the operator-side consequence; that one is the architectural why.

Backup & Disaster Recovery

The data-side complement. sanoid + syncoid for snapshot policies, ZFS-native replication, ransomware recovery patterns. Together with disposable-infra, this is the full DR story.

Kubernetes Masterclass

The K8s deep-dive. How kube-cluster spawns workers, how klab-firstboot wires Cilium / Tetragon / Hubble, what the per-node klab golden actually contains.

Image Export Guide

The hands-on for the “USB IS the DR vehicle” story. How kexport produces every cloud-ready format, and the actual commands for upload-to-AWS / Azure / GCP / OVH workflows.

The takeaway, one sentence: when your install procedure and your DR procedure are the same procedure, executed against a different output target, you stop having a DR product and start having a DR property of the platform. The latter is cheap, tested every time you use it, and gives you operator-behavioural freedom the former can’t match.

Try the demo: time your own “destroy K8s cluster → rebuild from scratch” on a kldload box. Run a stopwatch. The number you get will be a defensible disposable-infrastructure measurement for your hardware — and you’ll know whether the shift this masterclass describes is real for you.