What are Kata Containers?
Kata Containers is an open-source container runtime designed to provide the speed and manageability of containers with the security and isolation of Virtual Machines (VMs). It is an OCI (Open Container Initiative) compliant runtime that acts as a drop-in replacement for runc in Kubernetes environments.
In standard container architectures (like Docker or standard Kubernetes), all containers on a host share the host OS kernel. While this makes containers lightweight and fast, it introduces a large attack surface. If a malicious user escapes a container, they gain access to the host kernel. Kata Containers solves this by spawning a lightweight, dedicated VM for each container or pod. The container runtime executes inside this VM, providing hardware-grade isolation via nested virtualization (KVM) while maintaining standard Kubernetes APIs.
The project traces its roots to 2017, when Intel's Clear Containers merged with Hyper.sh's runV to form Kata Containers. It is now governed by the Open Infrastructure Foundation (formerly the OpenStack Foundation), giving it vendor-neutral stewardship and a broad contributor base spanning Intel, AWS, Alibaba, and the wider cloud-native community.
How Kata Containers Works
From a Kubernetes perspective, Kata Containers operates identically to a standard container runtime. However, under the hood, the architecture is split between the Host environment and the Guest VM environment.
Kubernetes Host Node
Kubelet requests a pod creation
Lightweight Virtual Machine (Guest)
Isolated Kernel & Hardware Boundaries
When Kubernetes schedules a pod to a node using Kata, the Container Runtime Interface (CRI) passes the request to the Kata Shim. The shim coordinates with the hypervisor to boot a lightweight VM. Inside the VM, the Kata Agent receives the container image and config, sets up the Linux namespaces and cgroups inside the VM, and starts the application.
Shim v2 Design
Kata Containers follows a shim v2 architecture compatible with the OCI runtime specification, integrating with orchestrators through standard interfaces rather than a custom shim-per-container-runtime stack:
┌─────────────────────────────────────────────────────────────┐ │ Orchestrator (Kubernetes) │ │ ↓ (CRI) │ ├─────────────────────────────────────────────────────────────┤ │ Container Runtime (containerd/CRI-O) │ │ ↓ (shim v2) │ ├─────────────────────────────────────────────────────────────┤ │ Kata Containers Runtime (containerd-shim-kata) │ │ ↓ │ ├─────────────────────────────────────────────────────────────┤ │ Kata Agent (inside guest VM) │ │ ┌──────────────┐ ┌─────────────────┐ │ │ │ ttrpc/API │ │ OCI-compliant │ │ │ │ (gRPC) │ │ container mgmt │ │ │ └──────────────┘ └─────────────────┘ │ └─────────────────────────────────────────────────────────────┘
Container Lifecycle
- Create — the runtime spawns a lightweight VM with the Kata Agent running inside.
- Start — the runtime sends an OCI bundle specification to the Agent via ttrpc.
- Exec — the Agent creates namespaces, cgroups, and processes within the guest VM according to the OCI spec.
- IO Handling — stdin/stdout/stderr are proxied between host and guest via vsock or serial connections.
- Delete — the VM is terminated, providing complete cleanup and isolation teardown.
Using the containerd shim v2 API gives Kata direct integration with containerd (no separate containerd-shim + runc stack), reduced per-container memory overhead on the host, and better resource accounting.
Core Technical Components
The Kata Containers architecture is modular, relying on several key components to maintain the illusion of a standard container while enforcing VM boundaries.
Kata Shim (Runtime)
Implemented as containerd-shim-kata-v2 or kata-runtime. This host-side binary sits between the Kubernetes CRI (containerd/CRI-O) and the hypervisor. It manages the VM lifecycle, networking setup, storage management, and proxies standard container APIs (like exec and logs) to the agent inside the VM.
Hypervisor
Kata supports multiple hypervisors. By default, it uses QEMU/KVM. For faster boot times and smaller footprints, it also supports Cloud Hypervisor, Firecracker, ACRN, and Dragonball. The hypervisor provides the hardware isolation boundary.
Kata Agent
A long-running, statically compiled process inside the guest VM that acts as the OCI runtime (similar to runc) for the guest. It receives ttrpc (gRPC over vsock/serial) commands from the host shim and manages container processes inside the VM.
Virtio Devices
To provide networking and storage to the isolated container, Kata uses virtio interfaces. Block devices (storage) and network interfaces are attached to the VM using virtio, ensuring near-native I/O performance despite the virtualization layer.
Guest Kernel & Image
A custom-configured guest kernel optimized for container workloads, paired with a minimal root filesystem image (e.g. kata-containers.img) that boots quickly and minimizes the guest attack surface.
ttrpc / gRPC Channel
Host and guest communicate over a lightweight ttrpc protocol (gRPC over vsock or serial), which the Kata Agent uses to receive OCI-compliant container management commands from the runtime.
Hypervisor Support
Kata Containers supports multiple hypervisors, allowing users to balance security, performance, and resource overhead based on their workload requirements.
| Hypervisor | Type | Characteristics |
|---|---|---|
| QEMU | Full-featured | Broad hardware support, mature, higher memory footprint (~128MB base) |
| Cloud Hypervisor | Rust-VMM based | Modern, secure, fast boot, lower footprint (~40-60MB base) |
| Firecracker | MicroVM | Extremely lightweight (~15-30MB), fast boot, AWS-developed |
| ACRN | Type-1 (hybrid) | Designed for IoT/edge, real-time capabilities |
| Dragonball | Rust-based | Alibaba-developed, integrated sandbox optimized for containers |
Security Model
Isolation Guarantees
- Kernel Isolation — each pod runs its own guest kernel, eliminating shared-kernel attack surfaces; a container escape via kernel exploit is contained within the VM.
- Hardware-Enforced Boundaries — memory and CPU isolation is provided by the hypervisor and hardware virtualization extensions (Intel VT-x, AMD-V, ARM virtualization extensions).
- Minimal Guest Attack Surface — the guest OS is stripped down to only essential components needed to run the container workload.
Multi-Tenancy Safety
Kata Containers is specifically designed for untrusted or multi-tenant workloads where traditional containers (sharing the host kernel) are insufficient, including:
- SaaS platforms running arbitrary user code
- CI/CD environments executing untrusted build scripts
- Scenarios requiring mixed criticality workloads on shared infrastructure
Performance Characteristics
The isolation Kata provides comes with measurable but manageable overhead compared to shared-kernel runtimes like runc.
| Metric | runc | Kata (QEMU) | Kata (Cloud Hypervisor) |
|---|---|---|---|
| Boot Time | ~100-300ms | ~500ms-2s | ~100-300ms |
| Base Memory | ~0 (shared kernel) | ~128MB | ~40-60MB |
| Density | Very High | Moderate | High |
| I/O Performance | Native | Near-native (virtio) | Near-native (virtio) |
Optimization Strategies
- Virtio Devices — paravirtualized I/O (virtio-net, virtio-blk, virtio-fs, virtiofsd) minimizes virtualization overhead.
- VM Templating — pre-created VM snapshots reduce boot latency for new containers.
- VSOCK — efficient host-guest communication without network stack overhead.
- Kata 2.x/3.x — significant architectural improvements (Rust runtime rewrite) reducing memory footprint and startup time.
Storage & Networking
Storage
9p / virtio-9p is a legacy shared filesystem (slow, not recommended for production). virtio-fs is the modern shared filesystem with DAX support, providing near-native performance for read-heavy workloads. Direct block device passthrough is available for high-performance storage, and OverlayFS is supported inside the guest for container image layers.
Networking
Network interfaces are created on the host and passed into the VM via virtio-net or vhost-user (TC mirroring). Kata is CNI-compatible, working with standard Kubernetes CNI plugins (Calico, Cilium, Flannel, Weave). Multiqueue virtio-net improves throughput through parallel packet processing.
Configuration & Tuning
Kata Containers uses a TOML configuration file (configuration.toml) that controls the default hypervisor selection, guest kernel and image paths, resource limits (memory, CPUs), security policies, and debugging options.
Runtime Classes (Kubernetes)
In Kubernetes, Kata Containers is typically registered as a RuntimeClass:
apiVersion: node.k8s.io/v1 kind: RuntimeClass metadata: name: kata handler: kata
Pods can then select it via:
spec: runtimeClassName: kata
Kata Containers vs. Alternatives
The primary difference lies in the isolation boundary. Standard containers use OS-level virtualization (namespaces), while Kata, gVisor, and Firecracker each take different approaches to closing the shared-kernel gap.
| Feature | runc | Kata Containers | gVisor | Firecracker (standalone) |
|---|---|---|---|---|
| Isolation | OS-level | VM-level | Sentry (user-space kernel) | VM-level |
| Kernel Sharing | Yes | No | No | No |
| Startup Time | Fast | Moderate | Moderate | Fast |
| Memory Overhead | Minimal | Low-Moderate | Low | Very Low |
| OCI Compliant | Yes | Yes | Partial | No (needs wrapper) |
| K8s Native | Yes | Yes (RuntimeClass) | Yes | Via Kata/others |
Version Evolution
| Version | Key Changes |
|---|---|
| 1.x | Initial stable release, QEMU-focused, higher resource overhead |
| 2.0 | Complete rewrite in Rust (runtime), shim v2 architecture, reduced footprint |
| 2.1+ | Cloud Hypervisor as default, improved virtio-fs, Dragonball support |
| 3.x | Continued performance optimization, broader hypervisor support, enhanced security |
Use Cases
Multi-Tenant SaaS
Running customer-supplied code with strong isolation guarantees, so one tenant's workload cannot compromise another's data or the host.
CI/CD Pipelines
Executing untrusted build and test scripts from external contributors without risking the CI infrastructure's host kernel.
Confidential Computing
Integration with Intel TDX, AMD SEV, and ARM CCA for encrypted, attestable VMs — part of the Confidential Containers (CoCo) project.
Legacy App Modernization
Running applications that require stronger isolation than namespaces provide, without the operational overhead of managing full VMs.
Edge Computing
Lightweight VM isolation on resource-constrained edge devices using Cloud Hypervisor or Firecracker for minimal footprint.
Ecosystem & Governance
Kata Containers is governed by the Open Infrastructure Foundation, with source hosted at github.com/kata-containers. It has native support in containerd, CRI-O, Kubernetes, and Docker (via the containerd backend). Active development continues in the Confidential Containers (CoCo) project, which builds on Kata's VM isolation to deliver encrypted, attestable container workloads.
Frequently Asked Questions
What are Kata Containers?
Kata Containers is an open-source, OCI-compliant container runtime that runs each container or pod inside a lightweight, dedicated virtual machine instead of sharing the host kernel. It originated in 2017 from the merger of Intel's Clear Containers and Hyper.sh's runV.
How is Kata Containers different from runc?
runc isolates containers using OS-level namespaces and cgroups while sharing the host kernel. Kata instead boots a lightweight guest VM with its own kernel for each pod, containing a container escape inside the VM rather than exposing the host kernel, at the cost of moderately higher boot time and memory overhead.
Which hypervisors does Kata Containers support?
QEMU (default, full-featured), Cloud Hypervisor (modern, low footprint), Firecracker (AWS microVM), ACRN (IoT/edge), and Dragonball (Alibaba's Rust-based sandbox).
Summary
Kata Containers bridges the gap between traditional containers and virtual machines, offering hardware-enforced isolation without sacrificing the containerized developer experience. With support for multiple hypervisors, OCI compliance, and native Kubernetes integration via RuntimeClass, it serves as a critical security layer for workloads requiring stronger guarantees than namespace-based isolation can provide.
The project's continued evolution toward lower overhead (Cloud Hypervisor, Firecracker, Dragonball) and confidential computing integration positions it as a key technology for secure containerized infrastructure across multi-tenant SaaS, CI/CD, and edge deployments.