Kubectl Run Toolset¶
Disabled by Default
This toolset is disabled by default and must be explicitly enabled.
The kubectl-run toolset allows Holmes to run commands in temporary Kubernetes pods. This is useful for network debugging, DNS checks, and running diagnostic tools not available on the cluster.
Configuration¶
Add the following to ~/.holmes/config.yaml:
Security¶
For security, you must explicitly whitelist:
- Images: Only specified container images can be used
- Commands: Only commands matching the regex patterns are allowed
If no images are configured, all kubectl run commands are blocked.
Tools¶
kubectl_run_image¶
Runs a command in a temporary Kubernetes pod.
| Parameter | Type | Required | Description |
|---|---|---|---|
| image | string | Yes | Container image to use (must be in allowed_images) |
| command | string | Yes | Command to run (must match allowed_commands pattern) |
| namespace | string | No | Namespace for the pod (default: default) |
| timeout | integer | No | Timeout in seconds (default: 60) |
The temporary pod is automatically deleted after the command completes (--rm flag).
Example Use Cases¶
- DNS debugging: Run
nslookupto check service discovery - Network connectivity: Use
curlorwgetto test endpoints - Database connectivity: Test connections from within the cluster