<p>One of the container in the pod is going down. To debug, i have to be able to login to the container which is going down.</p>
<p>In docker, we had an option to use below</p>
<p>docker run -d  sleep infinity</p>
<p>But what about kubenetes? The container is one of the 3 containers in the POD. How can i bring it up and use sleep infinity or anything similar.</p>
<p>Thank you in advance</p>

WebDeveloper2017
<p>You can do the same. Make the command of the container sleep infinity and then exec into it.</p>
<p>You can do the same in serval ways.</p>
<ol>
<li>Edit the yaml manifest and apply.</li>
<li>Use <code>kubectl edit &lt;deployment-name&gt;</code> on the deployment resource in your cluster.</li>
<li>Use <code>kubectl patch</code> on the deployment resource in your cluster.</li>
</ol>
<p>You can exec into the specifc container by using the <code>--container</code> or short <code>-c</code> flag.</p>
<pre><code>kubectl exec &lt;pod&gt; --container &lt;container&gt; -ti -- sh
</code></pre>
