Agent Sandbox uses the Sandbox custom resource (CRD) to describe the desired and observed state of a sandbox.
Configuration example
The following example shows a Sandbox that includes an inline Pod template, an injected runtime sidecar, and a custom volume claim template.
Resource information
Item | Description |
API group and version (apiVersion) |
|
Resource kind (kind) |
|
Plural name (plural) |
|
Singular name (singular) |
|
Short name (shortName) |
|
Storage version (storageVersion) |
|
status subresource |
|
Sandbox
The top-level fields of Sandbox are described below.
Field | Type | Required | Description |
apiVersion | String | Yes | API group and version. Set to |
kind | String | Yes | Resource kind. Must be |
metadata | ObjectMeta | No | Standard Kubernetes object metadata, such as |
spec | SandboxSpec | Yes | Desired state of the sandbox. For the field details, see spec. |
status | SandboxStatus | No | Observed runtime state of the sandbox, populated by the system. For the field details, see status. |
spec
The spec object (SandboxSpec) defines the sandbox desired state.
Field | Type | Required | Description |
paused | Boolean | No | Whether to hibernate the sandbox Pod. Default: |
persistentContents | []String | No | Content preserved when the Pod resumes. Only |
shutdownTime | String | No | Absolute time at which to delete the sandbox, in RFC3339 format. The sandbox is deleted when this time is reached; if set to a past time, the sandbox is deleted immediately. The time must include a timezone offset (as required by RFC3339). UTC is recommended, for example, 2026-07-01T02:30:00Z. |
runtimes | []RuntimeConfig | No | Runtime sidecar configuration injected into the sandbox. Multiple sidecars can be configured. For the field details, see RuntimeConfig. |
pauseTime | String | No | Absolute time at which the sandbox is automatically hibernated, in RFC3339 format. The sandbox is hibernated when this time is reached. The time must include a timezone offset (as required by RFC3339). UTC is recommended, for example, 2026-07-01T02:30:00Z. |
template | PodTemplateSpec | No | Inline Pod template that describes the Pod to create. |
volumeClaimTemplates | []PersistentVolumeClaim | No | List of PersistentVolumeClaim (PVC) templates created for this sandbox. |
template and volumeClaimTemplates come from the embedded EmbeddedSandboxTemplate structure and are flattened under spec in the YAML.
RuntimeConfig
Field | Type | Required | Description |
name | String | Yes | Runtime type name. Valid values:
|
status
The status object (SandboxStatus) reports the sandbox runtime state.
status is automatically populated by the system based on observations and does not need to be configured manually.Field | Type | Description |
observedGeneration | Integer | Latest observed |
phase | String | Current phase of the sandbox. For valid values, see SandboxPhase. |
message | String | Human-readable status message. |
conditions | []Condition | List of status conditions for the sandbox resource. Each condition is identified by its |
podInfo | PodInfo | Key information about the underlying Pod. For the field details, see PodInfo. |
nodeName | String | Name of the node the sandbox is scheduled to. |
sandboxIp | String | IP address assigned to the sandbox. |
updateRevision | String | Template-hash calculated from |
PodInfo
Field | Type | Description |
annotations | map[string]string | Key annotations of the Pod. |
labels | map[string]string | Key labels of the Pod. |
nodeName | String | Name of the node the Pod runs on. |
podIP | String | IP address of the Pod. |
podUID | String | UID of the Pod. |
Enumeration values
SandboxPhase
Values of the sandbox phase status.phase have the following meanings.
Value | Description |
Pending | The Pod has been accepted by the system, but some containers have not yet started (for example, images are being pulled or a node is being bound). |
Running | The Pod is bound to a node and all containers have started. At least one container is running or restarting. |
Paused | The sandbox has been signaled to hibernate. The SandboxPaused condition indicates whether hibernation succeeded. |
Resuming | The sandbox is resuming. The SandboxResumed condition indicates whether the resume succeeded. |
Upgrading | The sandbox is being rebuilt for an upgrade through SandboxUpdateOps. The Upgrading condition indicates whether the upgrade succeeded. |
Succeeded | All containers in the Pod have terminated voluntarily with exit code 0, and the system does not restart them. |
Failed | All containers in the Pod have terminated, and at least one container terminated with a non-zero exit code or was killed by the system. |
Terminating | Cleanup is in progress after the sandbox was deleted. |
SandboxConditionType
Values of the status condition status.conditions[].type have the following meanings.
For each condition, Status is True on success and False on failure.
Value | Description |
Ready | The sandbox is ready to serve. All associated containers are ready. |
SandboxPaused | Result of the sandbox hibernation. On success, all containers are hibernated. |
SandboxResumed | Result of the sandbox resume. |
InplaceUpdate | In-place update status. |
Upgrading | Upgrade workflow status. |
RuntimeInitialized | The agent-runtime inside the sandbox has finished initialization (first-time initialization, or re-initialization after resume, rebuild, upgrade, or dynamic mount). |
Condition values are the strings listed in the preceding table. Some values do not exactly match the source-code constants (for example, hibernation maps to SandboxPaused and resume maps to SandboxResumed). Use the string values as authoritative.
Valid values for PersistentContents
Valid values for the resume-time preserved content spec.persistentContents:
Value | Description |
filesystem | Preserve the file system during resume. |
Sandbox labels
Key | Description |
| Whether the sandbox has been claimed by a workload. |
| Name of the warm pool the sandbox belongs to. SandboxSet uses this label to manage sandboxes in the same pool. |
| Name of the SandboxTemplate referenced by the sandbox. SandboxUpdateOps uses this label to select target sandboxes. |
kubectl get output
Running kubectl get sandbox (or kubectl get sbx) displays the following columns by default.
Column | JSONPath | Description |
NAME |
| Sandbox name. |
STATUS |
| Current phase of the sandbox. |
AGE |
| Time elapsed since the sandbox was created. |
CLAIMED |
| Whether the sandbox has been claimed by a workload. |
SHUTDOWN_TIME |
| Absolute time at which to delete the sandbox. |
PAUSE_TIME |
| Absolute time at which the sandbox is automatically hibernated. |
MESSAGE |
| Status message. |