<p>I am using Kubernetes to exec into a pod like this:</p>
<pre class="lang-sh prettyprint-override"><code>kubectl exec myPod  bash -i
</code></pre>
<p>which works fine, except I don't get a prompt. So then I do:</p>
<pre class="lang-sh prettyprint-override"><code>export PS1=&quot;myPrompt &quot;
</code></pre>
<p>Which I would expect to give me a prompt, but doesn't. Is there some workaround for this?</p>

egilchri
<p>Trying to exec into pod in interactive way requires specifying <code>-ti</code> option.</p>
<p>Where <code>-i</code> passes stdin to the container and <code>-t</code> connects your terminal to this stdin.</p>
<p>Take a look at the following example:</p>
<pre><code>kubectl exec -it myPod -- bash
</code></pre>
