<p>I have a pre-made helm chart which I wish to install into a Kubernetes cluster.</p>
<p>What command can I run to work out how many nodes it will require? I know that I can utilise</p>
<pre><code>kubectl get pods -o wide   
</code></pre>
<p>To list all of the pods but my understanding is in theory multiple pods can run inside a single node.</p>
<p>One reason I am asking this besides learning is because I am using the DigitalOcean Managed Kubernetes service which requires me to specify how many nodes my cluster will be using, before I deploy via helm.</p>

Fachtna Simi
<p>That's very dependent on both your cluster and chart configuration, and there isn't a simple answer.</p>
<p>Given the chart, you can ask it to produce the Kubernetes YAML it would send to the cluster</p>
<pre><code>helm template . -f ...yaml --set option=value
</code></pre>
<p>using the same <code>-f</code> and <code>--set</code> options you plan to use with <code>helm install</code> to provide deploy-time settings.</p>
<p>In that output you're looking for most likely <code>Deployment</code> and <code>StatefulSet</code> objects; in each of those you're looking for its <code>replicas:</code> setting, and in the <code>template:</code>, the <code>resources: { requests: { ... }}</code>.  If you multiply this out you should be able to get the total memory and CPU that the chart needs to be scheduled on the cluster.</p>
<p>A &quot;node&quot; doesn't have a fixed size, and it depends on what kind of &quot;hardware&quot; you're running it on.  On AWS typical instance type options range from 1 core and 2 GB RAM up through 64 cores and 512 GB RAM.  If you determine that your application needs 16 cores and 64 GB RAM that could fit on one node if it's big enough, or it might need four.  You also need to determine if you can use the cluster autoscaler (in which case a fixed number of nodes isn't a constraint) and how much headroom you want in your cluster to be able to take nodes offline for upgrades or to run other workloads.</p>
<p>This shouldn't be too hard to work out with a spreadsheet, but it is very heavily dependent on the specific chart, what options you install it with, what size nodes you're thinking about using, and your other operational constraints.  There's not a single built-in command that translates &quot;Helm chart name&quot; to &quot;number of nodes&quot;.</p>
