Section 01
Three layers of state, not one
When people say "back up the cluster" they usually mean one specific layer and assume it covers the others. It does not. Separating them is the whole point of this page.
Section 02
What each tool actually captures
| Tool | Captures | Does not capture | Restores to |
|---|---|---|---|
| Backup (API objects) | Specs, labels, Secrets, the declared intent | Anything in RAM; anything written since the backup | A cluster that will start the workload fresh |
| Volume snapshot | The bytes on a PersistentVolume at an instant | Process memory; open descriptors; in-flight writes still buffered in the app | A disk you can attach to a new pod |
| Checkpoint (CRIU) | Process memory, descriptors, child processes, the exact execution point | Anything the kernel cannot re-create — see chapter 04 | A container that continues rather than starts |
A backup answers "what did we ask for?" A checkpoint answers "what was it doing?" If a pod is misbehaving at 03:00 and you want to know why, a backup of its Deployment tells you nothing you did not already have in git. A checkpoint tells you what was in its memory at that moment.
Section 03
What a checkpoint actually is
Concretely: the kubelet exposes an endpoint. You POST to it naming a namespace, a pod and a container. The kubelet asks the container runtime to checkpoint that container; the runtime asks CRIU to dump the process; CRIU walks the process's memory and kernel state and writes it out; the runtime packs the result, plus a filesystem diff and the container's configuration, into a single tar file on the node.
Section 04
The asymmetry: you can save, but there is no load button
This is the single most surprising thing about the feature, and the reason the set exists. Kubernetes gives you an API to create a checkpoint. It gives you no API to restore one. The way back is not a Kubernetes verb at all: you wrap the archive in a container image and start a pod from it, which is a container-runtime capability.
Section 05
Why the feature is called "forensic"
The upstream enhancement is titled Forensic Container Checkpointing, and the word is doing real work. The design target is: a container is behaving suspiciously, you want a copy of its memory to analyse elsewhere, and you want it without alerting whatever is running inside — so the container is not stopped.
That framing explains two things that otherwise look like omissions. There is no restore verb because restoring was never the goal. And the archive is readable by anyone who can read it: it is meant to be carried to an analysis machine.
If a checkpoint contains process memory, then it contains everything the process had in memory — including credentials it read from a Secret, decrypted data, and session tokens. Chapter 05 puts a known value into a pod through a Kubernetes Secret and recovers it from the archive with one command. Treat a checkpoint file as being as sensitive as a memory dump, because that is what it is.
Section 06
Glossary
| Term | Meaning in this set |
|---|---|
| declared state | API objects — what you asked the cluster for. |
| runtime state | What exists only inside a running process: memory, descriptors, sockets, children. |
| checkpoint | A capture of runtime state, written to a tar archive on the node. |
| restore | Starting a container from a checkpoint so the process continues rather than starts. |
| CRIU | Checkpoint/Restore In Userspace — the Linux tool that does the actual dumping. |
| CRI | Container Runtime Interface — the gRPC contract between the kubelet and the runtime. |
| CRI-O | A container runtime. As of this writing, the only one implementing the checkpoint CRI call (chapter 02). |
| dump | CRIU's word for capturing a process. The opposite of restore. |
| rootfs diff | The files the container changed since its image — shipped inside the archive. |
| feature gate | A kubelet switch. ContainerCheckpoint has been on by default since 1.30. |
| KEP | Kubernetes Enhancement Proposal. This feature is KEP-2008. |
Section 07
Where to go next
This set
Chapters 01–05 were measured on a real single-node cluster; chapter 06 is documentary.
Primary sources worth reading first
Closing
What this page simplifies
- "The runtime asks CRIU" hides three separate places the request can be refused — a feature gate, a runtime that does not implement the call, and a runtime binary built without CRIU support. Chapter 02.
- "Non-destructive" is a property of this code path, not of checkpointing in general. CRIU can absolutely stop a process; the Kubernetes path hardcodes keeping it running. Chapter 01.
- Not all runtime state survives. One common kind does not merely fail to come back — it stops the checkpoint being taken at all. Chapter 04.
- "Wrap it in an image and start a pod" is three commands and at least one configuration change that is not obvious. Chapter 03.
Check yourself
Your cluster has nightly Velero backups and hourly CSI volume snapshots. A pod is leaking memory and you want to know what is in it. Which tool helps?
A good answer mentions
- Neither — both capture layers above the process
- Velero gives you the spec you already have in git; the snapshot gives you files, not heap
- A checkpoint is the only one that captures process memory
check against §01 and §02
Why is there an API to take a checkpoint but not to restore one?
A good answer mentions
- The design goal was forensic analysis, not resumption
- Restoring is a container-runtime capability reached by building an image
- So the return path is userland, and is not a Kubernetes verb
check against §04 and §05