<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>

<p>You can kill the <code>kubectl attach -it ..</code> process without killing the pod:</p>
<pre><code>host$ kubectl attach -it podname
pod$ do something in pod
</code></pre>
<p>Open the other terminal and find your <code>kubectl attach</code> command and then kill it, something like:</p>
<pre><code>host$ ps x | grep &quot;kubectl attach&quot;
&gt; 1234 pts/22   Sl+    0:00 kubectl attach -it podname
host$ kill 1234
</code></pre>
