<p>Assume that I have a pod active and contains only one active container initially.
This container is a nodejs application in typescript and shows user interface when opened in browser.</p>
<p>Can this container create another container on-demand/dynamically within the SAME POD ?
How can we achieve this? Please advise.</p>
<p>Also, will reusing npm modules like <a href="https://www.npmjs.com/package/kubernetes-client" rel="nofollow noreferrer">https://www.npmjs.com/package/kubernetes-client</a> help in creating such containers within the same pod?</p>

che_new
<blockquote>
<p>Can this container create another container on-demand/dynamically within the SAME POD ? How can we achieve this?</p>
</blockquote>
<p>No, the containers within a Pod is declared in the <code>PodTemplate</code> that need to be declared upfront before the pod is created. More specific, what use case do you have? What are you trying to achieve?</p>
<blockquote>
<p>Also, will reusing npm modules like <a href="https://www.npmjs.com/package/kubernetes-client" rel="nofollow noreferrer">https://www.npmjs.com/package/kubernetes-client</a> help in creating such containers within the same pod?</p>
</blockquote>
<p>A kubernetes client library is useful for interacting with the ApiServer, e.g. for deploying new applications or Pods. But the Kubernetes <em>deployment unit</em> is a <strong>Pod</strong> - that is the smallest unit you work with. To change a Pod, you create a new one and terminated the previous one.</p>
