<p>I'd like to launch a pod which runs all the time in the cluster and it can be used by the users as a jump box for the k8s cluster. So I have created a <code>Deployment</code> and run a pod. However I'm not sure which should be the <code>CMD</code> for this container. I could use <code>/bin/bash</code> or /bin/sh` however when then the user wants to attach to it, it would create another shell inside the pod and I would not want this. Any suggestions?</p>

<p><strong>Update</strong></p>

<p>I've put as <code>CMD</code> the following one:</p>

<pre><code>CMD [ "/bin/sh", "-c", "trap : TERM INT; (while true; do sleep 1000; done) &amp; wait" ]
</code></pre>

<p>When I try to attach to the pod I get this:</p>

<pre><code>Unable to use a TTY - container test did not allocate one
If you don't see a command prompt, try pressing enter.
</code></pre>

<p>And pressing enter doesn't help.</p>

Mazzy
<p>If you want a jump box why not specify the the <code>CMD</code> to be <code>sshd</code> just like <a href="https://docs.docker.com/engine/examples/running_ssh_service/" rel="nofollow noreferrer">here</a>.</p>

<p>That should be able to allocate TTYs. </p>
