spawn_ephemeral_debug_container
Attach an ephemeral debug container to a running pod via kubectl debug to get a shell and run diagnostics on minimal or distroless images lacking essential tools.
Instructions
Attach an ephemeral debug container to a running pod via "kubectl debug" (e.g. to get a shell with tools a distroless/minimal app image lacks). The container sleeps for duration_seconds so it stays available; use exec_in_pod with the returned container name to run diagnostics against it (or against target_container's process namespace if target_container is set). Note: this mutates the live pod spec and the ephemeral container cannot be removed short of restarting the pod.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pod | Yes | ||
| image | No | busybox:1.36 | |
| namespace | No | default | |
| initial_command | No | ||
| duration_seconds | No | ||
| target_container | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |