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 and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store