Reputation: 761
I am using Kubernetes to exec into a pod like this:
kubectl exec myPod bash -i
which works fine, except I don't get a prompt. So then I do:
export PS1="myPrompt "
Which I would expect to give me a prompt, but doesn't. Is there some workaround for this?
Upvotes: 0
Views: 1542
Reputation: 8162
Trying to exec into pod in interactive way requires specifying -ti
option.
Where -i
passes stdin to the container and -t
connects your terminal to this stdin.
Take a look at the following example:
kubectl exec -it myPod -- bash
Upvotes: 1