containers – kubectl attach:无法使用TTY – 容器es-node没有
发布时间:2020-12-13 18:30:19 所属栏目:Linux 来源:网络整理
导读:我试图附加到Kubernetes中的正在运行的容器,但是我收到下面的错误消息. kubectl attach -it es-client-2756725635-4rk43 -c es-nodeUnable to use a TTY - container es-node did not allocate oneIf you don't see a command prompt,try pressing enter. 如
我试图附加到Kubernetes中的正在运行的容器,但是我收到下面的错误消息.
>kubectl attach -it es-client-2756725635-4rk43 -c es-node Unable to use a TTY - container es-node did not allocate one If you don't see a command prompt,try pressing enter. 如何在容器yaml中启用TTY? 解决方法
为了在连接时有适当的TTY和stdin:
kubectl attach -it POD -c CONTAINER 必须使用tty:true和stdin:true配置容器. 示例Pod: spec: containers: - name: web image: web:latest tty: true stdin: true (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |