kafkactl icon indicating copy to clipboard operation
kafkactl copied to clipboard

Kafkactl commands running on kubecontext when interrupted leave pods behind

Open kleewho opened this issue 6 months ago • 1 comments

Long running commands which in theory can run indefinitely (like consume) when run in K8s leaves still running pod behind. The reason seem to be the fact that whatever signals user is making the signals are received only by the locally running process that controls only kubectl. After the signal, the locally running process detaches and finishes quite quickly, but the underlying pod is still running. The solution might be to call kubectl delete pod <podName> -n <namespace> --wait=true after receiving the signal and maybe wait till the delete finishes.

I could prepare such an improvement if that's something that you think would be ok. I already have some sketch so maybe it won't take that long

kleewho avatar Jun 19 '25 19:06 kleewho

Hey @kleewho,

that would be a good improvement. I would be happy to review a PR for this :)

Cheers, Dirk

d-rk avatar Jun 23 '25 06:06 d-rk