rpk ai sandbox apply
Create sandboxes from one or more YAML manifests.
For each manifest: create the sandbox if absent, leave a matching one alone, and fail if a field the manifest sets differs from the live sandbox. A field the manifest omits is not compared: the live sandbox keeps what it has, though a create from the manifest would leave it empty.
Manifests round-trip with get -o yaml for this resource, which is how to
start from a complete one. Pass -f - to read stdin.
This does not delete sandboxes absent from the manifests (no prune); see
diff --help.
A manifest names the sandbox by its full resource name, sandboxes/<id>, as
get -o yaml prints it. display_name, description, template and tags are the
fields apply writes, and a sandbox keeps all of them for its life: apply
creates a missing sandbox, leaves a matching one alone, and refuses one whose
fields differ, since changing them means deleting the sandbox and creating a
new one. A sandbox’s files are lost with it.
A manifest may pin template_revision (sandboxTemplates/<t>/revisions/<n>) for a sandbox it creates. Without it, a new sandbox takes the template’s serving revision. An existing sandbox’s revision is never compared.
Needs SandboxTemplate.use on the template and Sandbox.create to create.
Examples
This section provides examples of how to use rpk ai sandbox apply.
dev.yaml
name: sandboxes/dev
template: sandboxTemplates/default
tags:
team: data
rpk ai sandbox diff -f dev.yaml
rpk ai sandbox apply -f dev.yaml
Flags
| Value | Type | Description |
|---|---|---|
|
strings |
manifest file, directory, or - for stdin ( |
Global flags
| Value | Type | Description |
|---|---|---|
|
string |
Redpanda or |
|
stringArray |
Override |
|
bool |
Ignore |
|
string |
|
|
bool |
Enable verbose logging. |