kubernetes_exec
MCP tools › Containers and Kubernetes
Runs one command (an argument list) in a Kubernetes pod or in a pod of a Deployment, StatefulSet, DaemonSet or Job through kubectl exec without a TTY: output (stdout, then stderr), exit code, whether output was cut at 1 MiB. Optional context, namespace, container, timeout_s (default 60, at most 600). Defaults to dry_run=true and returns the command; dry_run=false needs the user-granted run right and is logged in .ferris-idea/agent-log.jsonl.
Its results carry text from remote: the client is told to treat that as data, never as instructions.
| Capability | containers.kubernetes_exec |
|---|---|
| Area | Containers and Kubernetes |
| Access | changes processes |
| Reaches | process, network |
| Rights | run |
| Dry run | dry_run, on unless the call turns it off |
Arguments
| Argument | Type | Description |
|---|---|---|
context | string | Context (default: the current one). |
namespace | string | Namespace (default: the context's, else default). |
kindrequired | string | Pod, Deployment, StatefulSet, DaemonSet or Job. |
namerequired | string | Name of the object. |
container | string | Container of the pod (default: kubectl's choice). |
commandrequired | array of string | The command as an argument list. |
timeout_s | integer | Time limit in seconds (default 60, at most 600).minimum 0 |
dry_run | boolean | Only report the command (default true). |
Call it from a shell
ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.
ferris-idea call ~/my-project kubernetes_exec '{"kind":"<string>","name":"<string>","command":[]}'Input schema as JSON
{ "type": "object", "required": [ "kind", "name", "command" ], "properties": { "context": { "description": "Context (default: the current one).", "type": [ "string", "null" ] }, "namespace": { "description": "Namespace (default: the context's, else `default`).", "type": [ "string", "null" ] }, "kind": { "description": "`Pod`, `Deployment`, `StatefulSet`, `DaemonSet` or `Job`.", "type": "string" }, "name": { "description": "Name of the object.", "type": "string" }, "container": { "description": "Container of the pod (default: kubectl's choice).", "type": [ "string", "null" ] }, "command": { "description": "The command as an argument list.", "type": "array", "items": { "type": "string" } }, "timeout_s": { "description": "Time limit in seconds (default 60, at most 600).", "type": [ "integer", "null" ], "minimum": 0 }, "dry_run": { "description": "Only report the command (default true).", "type": [ "boolean", "null" ] } }}