Zeropod
lastmod 2025-11-13created 2025-11-131 edits
Pods that scale down to zero
About
- A runtime tool developed to reduce resource waste from inactive containers in Kubernetes environments
- Automatically checkpoints a container to disk when there are no TCP connections for a certain period
- Runs as a containerd shim; saves the container's memory state and stops it, then restores it within a few milliseconds on the next first connection
- On restore, all application state is recovered as is, so there is almost no delay from the user's perspective
- Uses eBPF-based redirection to forward TCP packets to a proxy, then switches to a direct connection once restore completes
- Performs checkpoint and restore using CRIU - Checkpoint and Restore in Userspace
- Provides a flow that automatically restores on the first request through an activation sequence
- Includes intelligent wait logic that tracks recent TCP activity to prevent frequent stop/restore cycles
- Kubernetes sees the container as still running, which prevents runtime restarts
- Automatically restores on kubectl exec, so it can be accessed like a regular container
- Each shim process collects metrics, and the per-node zeropod-manager aggregates them and exposes them via an HTTP endpoint
- Provides in-place scaling that dynamically adjusts resource requests if the cluster supports it
- Scaled-down Pods can be migrated to other nodes during node draining
- Also supports live migration as an experimental feature
- Suitable for low-traffic services, development/staging environments, low-cost tiers of Heroku-like platforms, backends for static sites, etc.
- Most programs work without modification, and CRIU errors can be analyzed through containerd logs