docker run -d --name cubesandbox --restart always tencentcloud/cubesandbox:latest
File: README.md
CubeSandbox
Cube Sandbox is a high-performance, out-of-the-box secure sandbox service built on RustVMM and KVM. It supports both single-node deployment and easy scaling to multi-node clusters. It is compatible with the E2B SDK and can create a hardware-isolated, fully serviceable sandbox in under 60ms with less than 5MB of memory overhead.
📰 News
| | v0.6: K8s deploy, Volume framework, template aliases K8s deploy — Deploy Cube control-plane components and compute nodes on Kubernetes Volume framework — E2B-compatible Volume framework that lets users plug in custom backend storage Template aliases — Set an alias when creating a template, and create sandboxes by specifying that alias. Changelog → · K8s deploy → · Volume plugin → |
| --- | --- | | | v0.5: AutoPause, Terraform deployer, ARM64 & network policy hardening AutoPause/AutoResume — idle sandboxes auto-suspend and wake on the next request. Terraform one-click cluster deployARM64 native full-stack support network policy hardening — per-sandbox traffic tokens, policy-routing egress. Changelog → · Terraform deploy → | | | v0.4: Safer egress, easier ops Credential vault — Agents call external APIs as usual; keys never enter the sandbox. Dashboard — version matrix and template health checks; see at a glance whether templates need rebuilding after upgrades. Changelog → · Security proxy guide → · WebUI guide → | | | Snapshot, Clone & Rollback at hundred-millisecond granularity CubeSandbox 0.3.0 introduces the CubeCoW Copy-on-Write snapshot engine, enabling event-level snapshots, instant cloning, and rollback to any saved state. Changelog → | | | 🎉 Initial open-source release Cube Sandbox is now open source! Millisecond boot, hardware-level isolation, E2B-compatible sandbox for AI Agents. Changelog → |
Product Highlights
| ⚡ Ultra-fast Startup Resource pooling and snapshot cloning skip all cold-start overhead. Average <60ms cold start — sandbox creation faster than a blink. Quick start → | 🔒 Hardware Isolation Every sandbox runs a dedicated OS kernel in its own MicroVM. Architecture → | 🔌 E2B SDK Compatible Compatible with E2B SDK interface. Switch from E2B Cloud seamlessly by changing one environment variable — zero client code changes. Examples → |
| --- | --- | --- | | 📦 High-density Deployment <5MB overhead per sandbox enables thousands of instances per server via kernel sharing and Copy-on-Write (CoW). Supports automatic sandbox pause and resume, further improving deployment density and cost optimization. Quick start → | 🛡️ Network Security eBPF-based inter-sandbox isolation and egress filtering at kernel level; built-in L7 security proxy enables per-domain/path/method policies with automatic credential injection — secrets never visible to sandbox code. Security proxy guide → | 📸 Flexible State Management High-frequency snapshot and rollback at hundred-millisecond granularity. Create checkpoints on running sandboxes, roll back to any saved state at any time, or fork from a specific state to explore in parallel. v0.3 changelog → | | 💾 Volume Framework E2B-compatible Volume framework that lets users plug in custom backend storage solutions. Volumes have an independent lifecycle and can be shared across sandboxes. Volume plugin → | 🚀 Production Deployment Deploy production clusters on Tencent Cloud with one click using Terraform. Also supports deployment on standard Kubernetes clusters (preview). Terraform deploy → · K8s deploy → | 💪 ARM Architecture Support Full native ARM64 support across compilation, build, and deployment workflows. Bare-metal deploy → |
Demos
Installation & Demo
Performance Test
RL (SWE-Bench)
Snapshot · Clone · Rollback
Benchmarks
In the context of AI Agent code execution, CubeSandbox achieves the perfect balance of security and performance:
Metric
Docker Container
Traditional VM
CubeSandbox
Isolation Level
Low (Shared Kernel Namespaces)
High (Dedicated Kernel)
Extreme (Dedicated Kernel + eBPF)
Boot Speed *Full-OS boot duration
200ms
Seconds
Sub-millisecond (<60ms)
Memory Overhead
Low (Shared Kernel)
High (Full OS)
Ultra-low (Aggressively stripped, <5MB)
Deployment Density
High
Low
Extreme (Thousands per node)
E2B SDK Compatible
/
/
✅ Drop-in
Cold start benchmarked on bare-metal. 60ms at single concurrency; under 50 concurrent creations, avg 67ms, P95 90ms, P99 137ms — consistently sub-150ms.
Memory overhead measured with sandbox specs ≤ 32GB. Larger configurations may see a marginal increase.
Sub-150ms sandbox delivery under both single and high-concurrency workloads
CubeSandbox base memory footprint across various instance sizes
text
(*Blue: Sandbox specifications; Orange: Base memory overhead). Note that memory consumption increases only marginally as instance sizes scale up. | |
Quick Start
Cube Sandbox requires an x86_64 Linux environment with KVM support.
The guide walks you through everything in four steps — provisioning a server, installing Cube Sandbox, creating a sandbox template, and running your first agent code. No source build needed, up and running in minutes.
| 🖥 PVM · Cloud VM →
text
**🏆 Recommended** | 🏗 Bare Metal → | 💻 Dev-Env →
⚠️ **Not recommended — poor performance** |
| --- | --- | --- |
First thing after install: open the Web console
After one-click deployment, open in your browser:
text
http://<control-node IP>:12088
Recommended three steps:
Check overview — Open Overview, confirm nodes are Ready and capacity looks healthy
Prepare a template — Install an official preset from Template Store; skip if you already have a READY template under Templates
Create a sandbox — Sandboxes → + New sandbox, pick a READY template, and view live logs on the detail page within seconds
OpenResty-based egress security gateway: L7 domain filtering, credential injection, and access auditing; works with CubeVS kernel policies so sandbox traffic cannot bypass inspection.
CubeHypervisor & CubeShim
Virtualization layer — CubeHypervisor manages KVM MicroVMs, CubeShim implements the containerd Shim v2 API to integrate sandboxes into the container runtime.
🛠️ Want to Code? Check out our CONTRIBUTING.md to learn how to submit a Pull Request.
📝 Want to contribute docs? Submit bilingual PRs to our community doc channels: Troubleshooting, Use Cases, and Integrations. Additionally, the Cube 100 Program is now open — we're looking for the first 100 teams running AI agents in production with Cube. Limited to 100 seats. Learn more & apply →
The birth of CubeSandbox stands on the shoulders of open-source giants. Special thanks to Cloud Hypervisor, Kata Containers, virtiofsd, containerd-shim-rs, ttrpc-rust, and others. We have made tailored modifications to some components to fit the CubeSandbox execution model, and the original in-file copyright notices are preserved.
File: agent/libs/safe-path/README.md
Safe Path
A library to safely handle filesystem paths, typically for container runtimes.
There are often path related attacks, such as symlink based attacks, TOCTTOU attacks. The safe-path crate provides several functions and utility structures to protect against path resolution related attacks.
The src/libs directory hosts library crates which may be shared by multiple Kata Containers components or published to crates.io.
Library Crates
Currently it provides following library crates:
| Library | Description | |-|-|-| | logging | Facilities to setup logging subsystem based slog. | | safe-path | Utilities to safely resolve filesystem paths. |
File: agent/README.md
cube-agent
The in-VM guest agent for Cube Sandbox. It runs as PID 1 inside each MicroVM (after cube-init execs it with wrapper_mode=on) and manages the full container lifecycle within the sandbox.
Upstream
cube-agent is derived from the kata-containers/kata-containers agent (src/agent/), originally authored by the Kata Containers community and licensed under Apache-2.0.
Cube-specific modifications include:
Replaced the Kata runtime protocol with the Cube ttrpc API (libs/protocols/)
cube-agent is packaged as an independent cube-agent.ext4 plane file (containing only /cube-agent). CubeShim injects it as virtio-pmem1. Guest Image contains lightweight cube-init as /sbin/init, which mounts pmem1 and execs the agent with wrapper_mode=on so the agent skips duplicate general_mount.
When the MicroVM boots, the agent:
Skips init mounts when wrapper_mode=on — cube-init already prepared /proc, /sys, /run, etc.
Notifies shim via SysCtrl — writes VsockServerReady (x86 PIO 0x680 / aarch64 MMIO 0x0903_0000). This is not the template SysStart handshake; open-source cube-init does not perform snapshot-mode SysCtrl handshake.
Listens for ttrpc commands — exposes the Cube agent API over a vsock channel; the shim (containerd-shim-cube-rs) connects to this channel to drive the agent.
See also ../guest-init/ for the lightweight Guest PID 1 (cube-init).
Build
cube-agent is built as a statically linked musl binary, then packaged into cube-agent.ext4 by deploy/one-click/build-agent-ext4.sh.
Prerequisites
bash
# Install the musl target and bootstrap system dependencies (run once)
arch=$(uname -m)
rustup target add "${arch}-unknown-linux-musl"
sudo ln -s /usr/bin/g++ /bin/musl-g++
sudo bash bootstrap.sh
Compile
bash
bash build.sh
The output binary is placed at target/<arch>-unknown-linux-musl/release/cube-agent.
Build via Docker (recommended for CI)
bash
make all-docker
# or from repo root:
make agent
Package cube-agent.ext4 via root Makefile (recommended)
bash
# From repo root — builds musl-static cube-agent inside the builder image,
# then packages _output/cube-agent/{cube-agent.ext4,version}:
make agent-ext4
# aliases:
make cube-agent-ext4
# with guest PID1 as well:
make pmem-assets
Or call the script directly after a prebuilt binary is available:
cube-agent exposes a ttrpc API over vsock. The protocol is defined in protobuf files under libs/protocols/protos/ and is shared with the Cube runtime (CubeShim).
To regenerate protocol bindings after changing .proto files:
bash
# Rust bindings (auto-generated at build time by build.rs)
cargo build
# Go bindings (used by the Cube runtime side)
make generate-protocols # requires protoc in $PATH
Standalone service that owns sandbox auto-pause / auto-resume coordination between CubeMaster, CubeProxy and Redis.
Consumes lifecycle events from cube:v1:shared:sandbox:lifecycle:events
Discovers every live CubeProxy replica in real time via cube:v1:shared:cube_proxy:{registry,heartbeat} and broadcasts sandbox metadata + state through their /admin/* endpoints
Handles the synchronous /internal/resume callback CubeProxy invokes when a paused sandbox receives a request
Local development
sh
make test # go test ./...
make build # local image, tag: cube-lifecycle-manager:v0.6.0-<arch>
Publishing images
Multi-arch release flow (mirrors CubeEgress/Makefile). Runs against both cube-sandbox-int.tencentcloudcr.com and cube-sandbox-cn.tencentcloudcr.com.
sh
# On an amd64 host:
make build push ARCH=amd64
# On an arm64 host:
make build push ARCH=arm64
# On either host (both arch-specific images must already be pushed):
make manifest
Overrides:
IMAGE_TAG=<tag> — override the release tag (default v0.6.0)
V=1 — verbose docker commands
Configuration
All configuration is via environment variables (prefix CUBE_LCM_); see internal/config/config.go for the authoritative list.
File: CubeAPI/examples/readme.md
Examples
See the top-level examples/ directory for standalone, runnable examples:
host-mount — mount host directories into a sandbox
A Copy-On-Write storage engine built on xfs-reflink (FICLONE), shipped as a Rust library crate that provides thin-provisioned volume management and O(1) snapshot/clone capabilities.
Overview
cubecow is a library crate that exposes a uniform interface through the Engine trait. It currently ships with a single backend:
xfs-reflink (ReflinkEngine) — uses regular files as volumes and snapshots inside a directory on a FICLONE-capable filesystem (XFS with reflink=1 / Btrfs / OCFS2 / …), and relies on the kernel FICLONE ioctl for O(1) metadata snapshots.
Key Features
Feature
Description
O(1) snapshots
Powered by the kernel FICLONE ioctl: extents are shared rather than byte-copied
Flat snapshot model
Every snapshot is an independent file; deleting one snapshot never affects any other
O(1) clones
Taking a snapshot of a snapshot is also a FICLONE — cost depends only on the source file's extent count
Simple crash recovery
Volumes and snapshots are files; on restart the in-memory index is rebuilt by scanning <root_dir>/volumes/. No standalone ledger required
Backend-agnostic API
All callers go through dyn Engine; adding a new backend does not require any change to the FFI / SDK callers
Every snapshot is "flattened" into the directory of its ultimate origin volume; deleting a snapshot is a single unlink and never touches any other snapshot's extents.
Build
Prerequisites
Rust 1.93+ (installation via rustup is recommended)
A FICLONE-capable filesystem to host root_dir (production setups should use mkfs.xfs -m reflink=1,crc=1)
# Unit tests (no root required; nothing is actually mkfs'd or mounted)
cargo test --lib
# End-to-end reflink performance benchmark (requires root + xfsprogs + losetup)
sudo cargo bench --bench reflink_ops
Configuration
Both TOML and JSON are supported; the JSON form is consumed directly by the FFI entry points cubecow_init_*_from_json as a string. The schema is intentionally minimal:
TOML
toml
[log]
level = "info,h2=warn,hyper=warn"
format = "compact" # "json" | "compact" | "pretty"
file = "/var/log/cubecow.log" # optional; logs go to stdout when unset
rotation = "daily" # "daily" | "hourly" | "never"
[backend]
kind = "reflink" # the only backend currently supported
[backend.reflink]
root_dir = "/var/lib/cubecow/reflink"
root_dir must be an absolute path whose mount point supports FICLONE. During initialize the engine performs a one-shot FICLONE probe; if it fails, startup is rejected outright.
Rust SDK usage
rust
use cubecow::{config::AppConfig, Engine};
let config = AppConfig::load("/etc/cubecow.toml")?;
let engine: Box<dyn Engine> = cubecow::initialize(config)?;
// Create a volume
let vol = engine.create_volume("my-vol", 10 * 1024 * 1024 * 1024)?;
println!("device path: {}", vol.device_path);
// Create a snapshot (metadata-only; do not activate immediately)
let snap = engine.create_snapshot("my-vol", "my-snap", false)?;
// List snapshots
let (snaps, _next) = engine.list_snapshots("my-vol", 10, None);
C FFI / Go integration
The C header lives at include/cubecow.h. The cubecow_ function prefix is preserved to keep ABI compatibility. A typical call flow:
c
#include "cubecow.h"
CubecowEngineHandle eng = cubecow_init_from_json(json_blob);
if (!eng) {
fprintf(stderr, "init failed: %s\n", cubecow_last_error());
return 1;
}
char* dev = NULL;
int rc = cubecow_create_volume(eng, "my-vol", 10ULL << 30, &dev);
if (rc == COW_OK) {
printf("created at %s\n", dev);
cubecow_free_string(dev);
}
cubecow_shutdown(eng);
A Go example lives at examples/go-test/ and uses cgo to link against -lcubecow:
bash
# 1. Build the Rust shared lib
cargo build --release
# 2. Build & run the Go test binary
cd examples/go-test
make run
AppSnapshotRequest is the request for creating an app snapshot. This request creates a cubebox, makes an app snapshot using cube-runtime, and then destroys the cubebox.
The RunCubeSandboxRequest to create the cubebox. Required annotations: - cube.master.appsnapshot.create: "true" - cube.master.appsnapshot.template.id: "<template_id>"
Snapshot path recorded on this node, if any. DEPRECATED in v4: cubelet resolves this from local catalog; legacy masters may still send it for backward compatibility but new masters MUST send empty.
cubecow objects that should be removed on this node. DEPRECATED in v4: cubelet derives objects from local catalog; legacy masters may still populate this for backward compatibility but new masters MUST send empty.
If set, run container in privileged mode. Privileged mode is incompatible with the following options. If privileged is set, the following features MAY have no effect: 1. capabilities 2. selinux_options 4. seccomp 5. apparmor
Privileged mode implies the following specific options are applied: 1. All capabilities are added. 2. Sensitive paths, such as kernel module paths within sysfs, are not masked. 3. Any sysfs and procfs mounts are mounted RW. 4. AppArmor confinement is not applied. 5. Seccomp restrictions are not applied. 6. The device cgroup does not restrict access to any devices. 7. All devices from the host's /dev are available within the container. 8. SELinux restrictions are not applied (e.g. label=disabled). | | run_as_user | Int64Value | | UID to run the container process as. Only one of run_as_user and run_as_username can be specified at a time. | | no_new_privs | bool | | no_new_privs defines if the flag for no_new_privs should be set on the container. | | run_as_group | Int64Value | | GID to run the container process as. run_as_group should only be specified when run_as_user or run_as_username is specified; otherwise, the runtime MUST error. | | run_as_username | string | | User name to run the container process as. If specified, the user MUST exist in the container image (i.e. in the /etc/passwd inside the image), and be resolved there by the runtime; otherwise, the runtime MUST error. | | readonly_rootfs | bool | | If set, the root filesystem of the container is read-only. when not set,RunCubeSandboxRequest.volumes should provide one empty_dir source for the rootfs rw and Container.VolumeMounts provide container_path="/" format |
ContainerStateValue
ContainerStateValue is the wrapper of ContainerState.
cubebox_storage_data is the private data of the cubebox store. It is used to store the data of the cubebox store. this field only used with with_cubebox_store option for cubecli command.
Annotations can also be useful for runtime authors to experiment with new features that are opaque to the Kubernetes APIs (both user-facing and the CRI). Whenever possible, however, runtime authors SHOULD consider proposing new typed fields for any new features instead.
Cgroups permissions of the device, candidates are one or more of * r - allows container to read from the specified device. * w - allows container to write to the specified device. * m - allows container to create device files that do not yet exist.
L7 destination port. When set, scheme MUST also be set — together they pin the (host, port, scheme) tuple CubeEgress intercepts via skb->mark + iptables TPROXY. Both omitted keeps the legacy default {80/http, 443/https} behavior.
EmptyDirVolumeSource
EmptyDirVolumeSource represents an empty directory for a sandbox.
media more like a scheduling problem - user says what traits they need, we give them a backing store that satisfies that. For now this will cover the most common needs. Optional: what type of storage medium should back this directory. The default is "" which means to use the node's default medium. +optional
Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a Sandbox. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir default 512Mi
LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified
How often (in Millisecond) to perform the probe. The action taken to execute the afterstop hook The action taken to determine the health of a container
PreStop
PreStop This hook is called immediately before a container is terminated due to an API request or management event such as a liveness/startup probe failure, preemption, resource contention and others.
Snapshot memory volume cubelet resolved during rollback. Master records it on the runtime ref so cleanup paths can detach the memory binding without re-fetching the local catalog.
Annotations can also be useful for runtime authors to experiment with new features that are opaque to the Kubernetes APIs (both user-facing and the CRI). Whenever possible, however, runtime authors SHOULD consider proposing new typed fields for any new features instead.
Named runtime configuration to use for this PodSandbox. If the runtime handler is unknown, this request should be rejected. An empty string should select the default handler, equivalent to the behavior before this feature was added. See https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class
Annotations can also be useful for runtime authors to experiment with new features that are opaque to the Kubernetes APIs (both user-facing and the CRI). Whenever possible, however, runtime authors SHOULD consider proposing new typed fields for any new features instead.
Path of the mount on the host. If the hostPath doesn't exist, then runtimes should report error. If the hostpath is a symbolic link, runtimes should follow the symlink and mount the real destination to container.
If set to true, the mount is made recursive read-only. In this CRI API, recursive_read_only is a plain true/false boolean, although its equivalent in the Kubernetes core API is a quaternary that can be nil, "Enabled", "IfPossible", or "Disabled". kubelet translates that quaternary value in the core API into a boolean in this CRI API. Remarks: - nil is just treated as false - when set to true, readonly must be explicitly set to true, and propagation must be PRIVATE (0). - (readonly == false && recursive_read_only == false) does not make the mount read-only.
Specific image sub path to be used from inside the image instead of its root, only necessary if the above image field is set. If the sub path is not empty and does not exist in the image, then runtimes should fail and return an error. Introduced in the Image Volume Source KEP beta graduation: https://kep.k8s.io/4639
VolumeSource
VolumeSource represents the source location of a volume to mount. Only one of its members may be specified.
plugin_volume delegates provisioning to a named external VolumePlugin (built-in, binary or RPC). All other fields above are handled by the existing storage pipeline and are NOT routed through the plugin framework.
ContainerState
ContainerState represents the lifecycle state of a container.
Name
Number
Description
CONTAINER_CREATED
0
CONTAINER_RUNNING
1
CONTAINER_EXITED
2
CONTAINER_UNKNOWN
3
CONTAINER_PAUSING
4
CONTAINER_PAUSED
5
InstanceType
Name
Number
Description
cubebox
0
MountPropagation
MountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used.
Name
Number
Description
PROPAGATION_PRIVATE
0
No mount propagation ("private" in Linux terminology).
PROPAGATION_HOST_TO_CONTAINER
1
Mounts get propagated from the host to the container ("rslave" in Linux).
PROPAGATION_BIDIRECTIONAL
2
Mounts get propagated from the host to the container and from the container to the host ("rshared" in Linux).
AppSnapshot creates a cubebox, makes an app snapshot, and destroys the cubebox. Required annotations: - cube.master.appsnapshot.create: "true" - cube.master.appsnapshot.template.id: "<template_id>"
ListLocalSnapshots returns the full catalog of snapshots known to this node. It is intended for master discovery / inspection so master does not need to persist physical references (vol/dev/path/meta_dir) in its tables.
InspectStorageVolumes lists every sandbox storage record cubelet owns and re-resolves cubecow device paths so cubecli can render an authoritative view without touching boltdb or the cubecow SDK directly.
image_devs is list of snapshots belong to erofs image device. A image can consist of the following components: 1. Composed solely of erofs layers 2. The erofs layer serves as the bottom layer, and the regular image layer serves as the upper layer 3. Ordinary image layer That is to say, the image cannot be composed of a regular image layer as the bottom layer and an erofs image layer as the upper layer. And a maximum of one erofs device can be used for one image.
dev_serial_id is the serial id of the device. this fileds is only used when the mount is a device.like erofs. When a layer belongs to a certain device, it is not allowed to use the host_path field again
Metadata of the sandbox. This information will uniquely identify the sandbox, and the runtime should leverage this to ensure correct operation. The runtime may also use this information to improve UX, such as by constructing a readable name.
Path to the directory on the host in which container log files are stored. By default the log of a container going into the LogDirectory will be hooked up to STDOUT and STDERR. However, the LogDirectory may contain binary log files with structured logging data from the individual containers. For example, the files might be newline separated JSON structured logs, systemd-journald journal files, gRPC trace files, etc. E.g., PodSandboxConfig.LogDirectory = /var/log/pods/<NAMESPACE>_<NAME>_<UID>/ ContainerConfig.LogPath = containerName/Instance#.log
Unstructured key-value map that may be set by the kubelet to store and retrieve arbitrary metadata. This will include any annotations set on a pod through the Kubernetes API.
Annotations MUST NOT be altered by the runtime; the annotations stored here MUST be returned in the PodSandboxStatus associated with the pod this PodSandboxConfig creates.
In general, in order to preserve a well-defined interface between the kubelet and the container runtime, annotations SHOULD NOT influence runtime behaviour.
Annotations can also be useful for runtime authors to experiment with new features that are opaque to the Kubernetes APIs (both user-facing and the CRI). Whenever possible, however, runtime authors SHOULD consider proposing new typed fields for any new features instead.
Optional configurations specific to Linux hosts. LinuxPodSandboxConfig linux = 8; Optional configurations specific to Windows hosts. WindowsPodSandboxConfig windows = 9; |
PodSandboxMetadata holds all necessary information for building the sandbox name. The container runtime is encouraged to expose the metadata associated with the PodSandbox in its user interface for better user experience. For example, the runtime can construct a unique PodSandboxName based on the metadata.
ReverseStreamForwardImage Reverse forwarding image download interface: 1. After launching the sandbox, the cubelet on the host first attempts to send a hello message indicating successful connection. The server inside the VM should establish a context representing this connection is ready. 2. When the server inside the VM receives a CRI image download request, it should send a reverse forwardImageRequest to the host to request image download. 3. After completing the image download on the host, it should proactively notify the VM with the image information based on the request ID.
Note: When the host has not actively connected to the server inside the VM, the server is considered invalid and image forwarding is prohibited. | | ListImages | ListImagesRequest | ListImagesResponse | ListImages lists existing images. |
CubeVMImageService
CubeVMImageService is used by cube image converter service in vm.
Docker means normal oci container images.should be pulled from dockerhub
ext4
1
image from local disk in ext4 format rootfs.
PullPolicy
Policy for pulling OCI objects. Possible values are: Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. +optional
Name
Number
Description
Always
0
PullAlways means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.
Never
1
PullNever means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present
IfNotPresent
2
PullIfNotPresent means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.
volume_base_dir is the parent directory that Cubelet requires the plugin to mount this volume under. The plugin MUST return a host_path located inside this directory (typically "<volume_base_dir>/<plugin>-<volume_id>"). Cubelet rejects the attach if host_path is not within volume_base_dir.
ref_count is the number of sandboxes already attached to this volume BEFORE this call (i.e. the pre-attach count). 0 → first attach; plugin should perform host-level setup.
private_data is opaque plugin state returned by Create and persisted in t_cube_volume. CubeMaster forwards it on sandbox create so Attach can reuse Create-time context without a second control-plane round-trip. Max length: 1024 bytes. May be empty.
private_data is opaque plugin state persisted in t_cube_volume and forwarded to Attach on sandbox create. Not returned to API/SDK clients. Max length: 1024 bytes. May be empty.
ref_count is the number of sandboxes still attached AFTER this call (i.e. the post-detach count). 0 → last detach; plugin should tear down host-level resources.
driver is the registered plugin name (e.g. "nfs", "s3fuse", "cfs"). Must match VolumePlugin.Name() on the Cubelet node.
VolumeControllerService
VolumeControllerService is the gRPC interface for CubeMaster Controller hooks. RPC-type plugins implement this service alongside VolumePluginService (Node).
Destroy permanently deletes a volume and its backend data.
VolumePluginService
VolumePluginService is the gRPC interface implemented by RPC-type plugins. The Cubelet VolumePlugin framework calls these RPCs instead of forking a subprocess.
UID that will run the command(s). This is used as a default if no user is specified when creating the container. UID and the following user name are mutually exclusive.
Recommendation on whether this image should be exempt from garbage collection. It must only be treated as a recommendation -- the client can still request that the image be deleted, and the runtime must oblige.
Unstructured key-value map holding arbitrary metadata. ImageSpec Annotations can be used to help the runtime target specific images in multi-arch images.