oc exec <id> [flags] -- <command...>
By default, creates an exec session and prints the session ID with attach instructions. Use --wait to run synchronously.
HTTP API →
boolean
default:"false"
Wait for completion, stream output, mirror exit code
string
Working directory
int
default:"0"
Timeout in seconds (0 = none)
string
Environment variable
KEY=VALUE (repeatable)oc exec list <id>
List active exec sessions for a sandbox. HTTP API →
Output: session ID, status (running or exited (code)), command, client count.
oc exec attach <id> <session-id>
oc exec kill <id> <session-id>
Kill an exec session. HTTP API →
int
default:"9"
Signal number (default: SIGKILL)