Add --rm
flag to kubectl debug
to remove debug pod on exit
#1681
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
What would you like to be added:
I would like to add the
--rm
flag tokubectl debug
, similar to the flag inkubectl run
anddocker run
, which allows automatic deletion of the debug pod upon exit. Since ephemeral containers cannot be removed, this flag would only apply when debugging a node or a pod with--copy-to
.I have already opened a PR for this feature, as its implementation is small:
kubernetes/kubernetes#129046
Why is this needed:
kubectl debug -it node
is very useful replacement forssh
, but I often forget to remove completed debug pods. These completed pods are generally not useful, and even the official documentation includes a step for "Cleaning up".The text was updated successfully, but these errors were encountered: