kubectl exec into pod 导致 Unable to use a TTY error every time if 运行 through automation
kubectl exec into pod resulting in Unable to use a TTY error every time if run through automation
我有一个简单的自动化程序可以执行到 kubernetes pod 中,但它总是会导致以下错误:-
kubectl exec -it my-pod -c my-contaner -n my-namespace /bin/bash
Unable to use a TTY - input is not a terminal or the right kind of file
我正在尝试 运行 一个简单的 shell 脚本,使用 jenkins 执行到 pod 中并在根目录中执行 ls -las 但它不允许自动执行到 pod 中。如果我在 linux 服务器终端上手动执行同样的操作,效果会很好。
谁能帮忙解决这个问题
我使用以下方法让它工作:-
kubectl exec -ti my-pod -c my-container -n my-namespace -- ls
我在 Jenkins build:
期间创建 pod 时遇到同样的错误
$ oc run netshoot-pod --attach=true --restart=Never --rm -i --tty --image nicolaka/netshoot -- curl $IP
Unable to use a TTY - input is not a terminal or the right kind of file
If you don't see a command prompt, try pressing enter.
Error attaching, falling back to logs
删除 --tty
/ -t
标记已修复。
我有一个简单的自动化程序可以执行到 kubernetes pod 中,但它总是会导致以下错误:-
kubectl exec -it my-pod -c my-contaner -n my-namespace /bin/bash
Unable to use a TTY - input is not a terminal or the right kind of file
我正在尝试 运行 一个简单的 shell 脚本,使用 jenkins 执行到 pod 中并在根目录中执行 ls -las 但它不允许自动执行到 pod 中。如果我在 linux 服务器终端上手动执行同样的操作,效果会很好。 谁能帮忙解决这个问题
我使用以下方法让它工作:-
kubectl exec -ti my-pod -c my-container -n my-namespace -- ls
我在 Jenkins build:
期间创建 pod 时遇到同样的错误$ oc run netshoot-pod --attach=true --restart=Never --rm -i --tty --image nicolaka/netshoot -- curl $IP
Unable to use a TTY - input is not a terminal or the right kind of file
If you don't see a command prompt, try pressing enter.
Error attaching, falling back to logs
删除 --tty
/ -t
标记已修复。