kubectl exec into pod resulting in Unable to use a TTY error every time if run through automation

前端 未结 2 434
一整个雨季
一整个雨季 2021-01-25 20:24

i have a simple automation to exec into a kubernetes pod but it always results in the below error :-

kubectl exec -it my         


        
2条回答
  •  余生分开走
    2021-01-25 20:56

    I got same error while creating a pod during Jenkins build:

    $ 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
    

    Removing --tty / -t flag has fixed it.

提交回复
热议问题