Why tty hangs after command is finished?

Viewed 286

I want to run a command like this:

kubectl run busybox -it --rm --restart=Never --image=busybox --command -- sh -c "env"

Expected to run command and delete pod. It prints the variables, but then terminal freezes, although pod is in completed state, but --rm not works.

Same thing works ok with docker:

docker run -it --rm busybox sh -c "env"

0 Answers
Related