Alibek Karimov
Alibek Karimov

Reputation: 53

kubectl run fail in interactive mode on CI

have issue with

kubectl run -ti 

in gitlab ci. For testing in CI we run docker container with "npm t" command in interactive mode and it was perfectly work on docker. After migrate to Kubernetes have issue, as kubectl run give next error: Unable to use a TTY - input is not a terminal or the right kind of file
Job run in image: lachlanevenson/k8s-kubectl If run kubectl run from local machine all work. Pls help

Upvotes: 1

Views: 1276

Answers (1)

mdaniel
mdaniel

Reputation: 33203

The PodSpec container: has a tty attribute, which defaults to false but which one can set to true (that's what the -t option, which is a shortcut for --tty=true, does in kubectl exec). You can experiment with setting stdin: true but at your peril, since it can hang the Pod waiting for "someone" to type something.

Upvotes: 1

Related Questions