kubectl debug
CautionEphemeral debug containers
kubectl debug -it <pod> --image=busybox --target=<c>
Injects a tool container into shell-less pods; 'node/<n>' even drops you onto the node itself.
Examples
kubectl debug -it web-abc --image=nicolaka/netshoot --target=appAttach netshoot for diagnosis
Syntax
kubectl debug -it <pod> --image=<img> [--target=c] / node/<node>
Before you run it
Injecting into prod pods needs judgment.
Related commands
- kubectl execExec into a pod
- kubectl runRun ad-hoc pods
- kubectl logsPod logs
The same reference, with no signal at all
Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store