问题
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"
来源:https://stackoverflow.com/questions/62589468/why-tty-hangs-after-command-is-finished