Sandboxed containers overview

更新时间:
复制 MD 格式

Sandboxed containers run pods in lightweight VMs with independent kernels, preventing container escapes from affecting hosts.

Background information

Sandboxed containers suit scenarios such as untrusted application isolation, fault isolation, performance isolation, and multi-tenant workload isolation. They enhance security with minimal performance impact and provide the same user experience as Docker containers for features such as logging, monitoring, and elastic scaling.

Compared to Kata Containers, sandboxed containers improve storage, networking, and stability.

image

Architecture

image

Key benefits

Sandboxed Container V2 is Alibaba Cloud's next-generation secure container runtime based on lightweight VM technology. Compared to V1, it maintains strong isolation while reducing overhead by 90%, increasing startup speed by 3x, and improving single-machine density by 10x.

  • Provides strong isolation between sandboxes with lightweight VMs.

  • Offers application compatibility with traditional runC containers.

  • Delivers up to 90% of runC container application performance.

  • Supports mounting and sharing NAS, cloud disks, and OSS Volumes via virtiofs. NAS also supports direct attachment.

  • Provides a user experience consistent with runC for monitoring, logging, and storage.

  • Supports RuntimeClass (runC and runV).

  • Easy to use with no extensive technical expertise required.

  • Offers greater stability compared to the community's Kata Containers.

ACK sandboxed containers vs. Kata Containers

Performance

Performance category

ACK Sandboxed Container V2

Community Kata Containers

Sandbox startup speed

About 150 ms

About 500 ms

Additional sandbox overhead

Low

High

Container RootFS

virtio-fs, Performance: ☆☆☆☆

  • 9pfs, Performance: ☆

  • virtio-fs, Performance: ☆☆☆☆

Container volumes

HostPath/EmptyDir

virtio-fs, Performance: ☆☆☆☆

Cloud disk block storage

virtio-fs, Performance: ☆☆☆☆

Does not support features such as online scaling (Resize), container I/O monitoring, block/raw devices, or cloud disk queue settings.

NAS file storage

  • virtio-fs (default), Performance: ☆☆☆☆

  • Direct attachment to sandbox, Performance: ☆☆☆☆☆

Does not support features such as Samba mounting and unmounting, recycle bin, Quota capacity control, capacity/I/O monitoring, or online scaling.

OSS Object Storage

virtio-fs, Performance: ☆☆☆☆

Network plugin

  • Terway: Improves network performance by 20% to 30% compared with Flannel. Supports NetworkPolicy, bandwidth throttling, and more.

  • Flannel: Supports Virtual Private Cloud (VPC) routing.

Flannel

Monitoring and alerting

  • Enhanced disk and network monitoring metrics for sandboxed container pods.

  • Integrates with Alibaba Cloud Cloud Monitor by default, simplifying cluster monitoring and alerting configuration.

Lacks disk and network monitoring metrics for sandboxed container pods.

Stability

☆☆☆☆☆

☆☆

Use cases

image

Scenario 1: Isolate untrusted applications with sandboxed containers (runV)

  • Security risks of runC containers

    image
    • Containers using namespace and cgroup isolation have a large attack surface.

    • All containers on a node share the host kernel. If a kernel vulnerability is exploited, malicious code can escape to the host, penetrate the private network, execute privileged code, disrupt services, and steal data.

    • Application vulnerabilities can also allow attackers to penetrate the private network.

    Mitigate runC container security risks with the following measures:

    • Seccomp: Filter system calls.

    • SELinux: Restrict permissions for container processes, files, and users.

    • Capability: Limit container process capabilities.

    • Rootless mode: Prevent running the container runtime and containers as root.

    These measures enhance runC container security but cannot prevent container escapes that exploit host kernel vulnerabilities.

  • Isolate security risks with sandboxed containers (runV)

    image

    Applications in a VM sandbox run on an independent guest OS kernel. Even if the guest kernel is compromised, the impact stays within that sandbox and does not affect the host or other containers. Combine sandboxed containers (runV) with Terway NetworkPolicy to configure pod-level access policies for full system, data, and network isolation.

Scenario 2: Address issues with runC containers, such as fault amplification, resource contention, and performance interferenceFault isolation

Kubernetes co-locates containers on nodes, but cgroups do not fully resolve resource contention. Resource-intensive applications, such as CPU-intensive or I/O-intensive workloads, compete for resources, causing response time fluctuations. Issues such as memory leaks or core dumps increase node load. A container that triggers a host kernel bug can crash the node, and faults can cascade to the entire cluster. Sandboxed containers (runV) use independent guest OS kernels and hypervisors to address fault amplification, resource contention, and performance interference in runC containers.

Scenario 3: Multi-tenant services

Enterprises with multiple lines-of-business (LOBs) or departments often require strong tenant isolation. For example, finance workloads may require dedicated environments separate from non-security-sensitive applications. Traditional runC containers cannot effectively prevent security risks from untrusted applications. Common approaches include:

  • Multiple single-tenant clusters: Separate finance clusters from non-security-sensitive clusters.

  • A single multi-tenant cluster: Separate LOB applications into namespaces with dedicated nodes per LOB. Multi-tenant isolation relies on resource quotas, network policies, and other features. This approach uses fewer control planes and lower management costs than multiple clusters, but does not solve wasted node resources from low utilization by some tenants.

    image

Sandboxed containers (runV) isolate untrusted applications in VM sandboxes, eliminating container escape risks and enabling mixed workloads on all nodes:

  • Reduces resource scheduling complexity.

  • Nodes serve multiple businesses, reducing resource fragmentation, improving utilization, and lowering cluster costs.

  • Sandboxed containers (runV) use lightweight VMs and deliver runC-comparable performance.

image

Technical exchange & Q&A

If you have questions about Sandboxed-Container, join the DingTalk group 30521601.

Limitations

Constraint Details
Cluster type ACK managed clusters and ACK dedicated clusters only
Cluster version 1.16–1.34. If your cluster version is outside this range, upgrade the cluster before proceeding.
Operating system Custom images are not supported. See the OS support matrix below.
Instance types ECS Bare Metal Instance types only
Network plugins Flannel and Terway (in some modes). When using Terway, dedicated ENI mode and DataPath v2 are not supported.

OS support matrix

Cluster version Supported OS
Earlier than 1.30 Alibaba Cloud Linux 3 and Alibaba Cloud Linux 2 (maintenance has stopped)
1.30 and later Alibaba Cloud Linux 3 only