Why tty hangs after command is finished?

允我心安 提交于 2020-07-23 08:03:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!