<p>I have a running pod and I use <code>kubectl attach -ti mypod</code> to give him input.</p>
<p>But then, I would like to &quot;deattach&quot; from my pod and return back to my terminal without terminating my pod.
How can I do that?</p>

Abdelghani
<p>From the kubernetes <a href="https://kubernetes.io/docs/reference/kubectl/docker-cli-to-kubectl/#docker-attach" rel="nofollow noreferrer">docs</a>:</p>
<blockquote>
<p>To detach from the container, you can type the escape sequence Ctrl+P
followed by Ctrl+Q.</p>
</blockquote>
<hr />
<p>Update:</p>
<p>Based on feedback from @Abdelghani:</p>
<blockquote>
<p>For the record, this does not work if tty is set to false in the
container. I didnt find another way to detach other than killing the
pod/container.</p>
</blockquote>
