<p>I have just started experimenting with Helm kubernetes package manager.
But chart vs template topic seems a bit confusing to me. </p>

<p>I understand that by template I will create kubernetes yaml, which will create the objects and install them.
However the same is true for charts as well, but this latter is an abstraction over the yamls. And ./Charts containns standalone charts, while ./templates is valid only for the base chart. So I know that. But when should I include an other chart or just create a template?</p>

<p>Looking for different kind of charts through the web I still don't know which to use.</p>

<p>Say I have a project called MyApp, which has one component named MyServer which will communicate to MySql.</p>

<p>So I created a chart and put in it MyServer as a template :<br>
 <code>./MyApp/templates/MyServer.yaml</code> <br>
What should I do with MySql?
I have seen both solutions in different projects, one just creates an other template:<br>
 <code>./MyApp/templates/MySQL.yaml</code> <br>
on other project I saw a chart for MySql from a chart repository:<br>
 <code>./MyApp/charts/mysql-version.tgz</code> <br><br>
On the top of that I have seen a bigdata project (hdfs,kafka,zookeeper,ELK,oracle db..etc) and one component was included as chart in ./charts other was created as a template in./templates.<br>
This whole decision between chart and template seems random and confusing to me.<br>
Could you explain it please when to use which?</p>

<p>A <em>chart</em> is a collection of <em>templates</em>, plus a little extra information like the metadata in the <code>Chart.yaml</code> file and the default <code>values.yaml</code>.  In your example, <code>MyApp</code> is itself a chart.</p>

<p>For well-known dependencies (particularly things in the <a href="https://github.com/helm/charts" rel="noreferrer">Helm charts repository</a> and especially the <a href="https://github.com/helm/charts/tree/master/stable" rel="noreferrer">stable</a> charts) you're probably better off using the external chart; declare the dependency in your <code>requirements.yaml</code> or (Helm v3) <code>Chart.yaml</code> file and run <code>helm dependency update</code>.  This lets you import the chart with two lines, rather than reproducing the StatefulSet, PersistentVolumeClaim, <em>etc.</em> that are included in the chart.</p>
