An extension of kubectl debug
that not only attaches starts a debugging pod sharing a process namespace with a target container in a running pod, but additionally copies that target container's volume specification to that of the ephemeral container.
For more information, check out my blog post on this:
This script was created as a proof-of-concept and for personal use. It is not ready to be industrialised or, say, submitted to the krew project as-is.
This script does not implement all kubectl debug
functionality, but only extends the functionality where your debugging container shares a process namespace with a target container specified by --target
.