Skip to main content
POST
Execute command in pod

Authorizations

Authorization
string
header
required

Personal Access Token (cnap_pat_...) or OAuth2 JWT. Create tokens at https://cnap.tech/account/tokens

Path Parameters

id
string
required

Cluster ID

Body

application/json
namespace
string
required

Kubernetes namespace

Required string length: 1 - 253
Example:

"default"

pod
string
required

Pod name

Required string length: 1 - 253
Example:

"postgres-0"

container
string
required

Container name within the pod

Required string length: 1 - 253
Example:

"postgresql"

command
string[]
required

Command and arguments

Minimum array length: 1
Example:

Response

Command result

stdout
string
required

Standard output

stderr
string
required

Standard error

exit_code
integer
required

Exit code (0 = success)