-
Notifications
You must be signed in to change notification settings - Fork 990
Closed
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.
Description
What would you like to be added:
I would like to add the --rm flag to kubectl debug, similar to the flag in kubectl run and docker 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 for ssh, 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".
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
node-debugger-minikube-4gq42 0/1 Completed 0 74s
node-debugger-minikube-8xrvr 0/1 Completed 0 31s
node-debugger-minikube-hscjt 0/1 Completed 0 20s
..
yellowhat, lariskovski, vitalibit, marriva, snakewithhat and 1 more
Metadata
Metadata
Assignees
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.