Skip to main content
k7d: fork isolated Kubernetes clusters — two clocks, ~105 ms and ~1.1 s

k7d is a Rust VMM that forks running VMs — including a live multi-VM Kubernetes cluster — with memory, disk, processes, and network identity intact. Boot once, then explore dozens of byte-identical worlds for RL and agent evals.

Two clocks, always together: ~105 ms to fork the minimal CI guest (a busybox initramfs running k3s, test-enforced 1 s budget) and ~1.1 s to fork a 3-node Ubuntu 24.04 cluster running k3s + Cilium + Tetragon (48 s source bring-up). Forks share memory until they diverge, so 50 CI-guest copies of a cluster fit on one 64 GB box.

k7d also owns the guest clock. An episode that is mostly waiting — readiness probes, backoffs, reconcile ticks — does not have to wait in wall time: lockstep clock jumps compress an 8.7-minute guest-time episode 1.83× with zero fidelity delta, and continuous KVM time dilation runs guests at 8× wall. See Time warp.

Every VM boots through one daemon and one containerd shim, but you choose the engine: k7d’s in-process rust-vmm VMM (runtimeClassName: k7, the ~5 ms MAP_PRIVATE fork) or a stock, sha-pinned Firecracker under the stock jailer (runtimeClassName: k7-fc) when the VMM must sit outside the daemon’s address space — same guest, agent, fork/tree/pool verbs and in-guest Docker service. See Backends.

For sandboxes at scale with a CLI / API / Python SDK, see K7.

Watch it#