<p>So, is it possible to share the same pod among helm packages with a common reference. Example:</p>
<p>Scenario:</p>
<pre><code>Package A
   ...
   - requirements.yml
         require: C

   
Package B
   ...
   - requirements.yml
         require: C
</code></pre>
<p>When I run:</p>
<pre><code>helm install A
helm install B
</code></pre>
<p>These two pods for A and B project use the same C pod.
Is it possible? Theres a documentation to help me with that?</p>
<p>PS: The C package in my case is a broker, but both A &amp; B package can be deployed separately.</p>

Alvaro Inckot
<p>This should work fine with Helm. A little bit of background <a href="https://docs.helm.sh/developing_charts/#operational-aspects-of-using-dependencies" rel="nofollow noreferrer">here</a>. One key aspect here is <code>update</code>:</p>

<blockquote>
  <ul>
  <li>created/updated in that order.</li>
  </ul>
</blockquote>

<p>When you update an object, i.e, <code>kubectl apply</code> on a Pod/Deployment/Service/etc if the object exists it won't be changed, so you'll end up with the same object in the end. </p>

<p>Also, Kubernetes objects with the same name use the <a href="https://kubernetes.io/docs/reference/using-api/api-concepts/#standard-api-terminology" rel="nofollow noreferrer">idempotency principle</a>:</p>

<blockquote>
  <p>All objects will have a unique name to allow idempotent creation and retrieval</p>
</blockquote>

<p>In your example:</p>

<pre><code>helm install stable/packageA =&gt; which also installs PackageC
helm install stable/packageB =&gt; will update PackageC, but it's already present and won't change.
</code></pre>

<p>You have to make sure that the dependencies for <code>PackageA</code> for <code>PackageB</code> are exactly the same version of <code>PackageC</code>.</p>
