<p>Suppose I have created a Pod having 1 container, now I want to add a second container to it, how can I do that?</p>

<p>In general, the answer is &quot;no&quot;. Once you have created a Pod, you cannot add a new Container to it. <a href="https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/" rel="nofollow noreferrer">Read the official note</a>:</p>
<blockquote>
<p>Since Pods are intended to be disposable and replaceable, you cannot
add a container to a Pod once it has been created.</p>
</blockquote>
<p>However, sometimes it's necessary to inspect the state of an existing Pod, for example, to troubleshoot a hard-to-reproduce bug. In these cases, you can run an <a href="https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/" rel="nofollow noreferrer"><strong>Ephemeral Container</strong></a> in an existing Pod to inspect its state and run arbitrary commands.</p>
<p>But before you think that you can create an ephemeral container to run your application and add to a running Pod, please note that Ephemeral Containers are not appropriate for running applications because they lack guarantees for resources or execution, and they will never be automatically restarted</p>
