Hi
In the earlier lecture, we discussed about various components involved as a part of helm.
Now it's time to get more in detail about the charts, how to create a custom chart and the syntax and
the various components within the charts.
This is going to be the main section within this particular course where
We are going to have detailed discussion about each and every component within chart.
For that, I'm going to create a custom project and get more in
details about various files available as a part of the charts and how to make use of them.
Then we will start creating a chart from the scratch.
Let me get into the machine where I do have the helm installed. Here
I will be issuing the command helm create mychart
So it's going to create a chart with the name mychart
And that will be put within a folder called mychart
So here mychart folder got created.
If I get into this specific folder, I will be having all the basic required files.
And this by default, create a small chart with sample deployment, services everything.
What I will be doing, I will use this specific structure
Then we will create a chart from the scratch.
Before that, let me get into the different folders and see what are all information will be available within it.
The very basic thing of charts is the templates that will be put within the templates folder if I get
into the templates folder I will be having some sample templates, for time being
Let's not worry about these templates which got created by default for understanding purposes
Let me cat a sample deployment.yaml file
It's going to have the deployment.yaml file, which is templatised, for example within name
I do have a variable which will be read from some value files or from some other chart template.
Don't worry about this particular syntax, what it is
We will be having detailed discussion about each and every component of it.
This is just to have a feel, how a template would look like.
And within the charts folder, we will be having all the dependent charts
This particular main charts depends on
And this particular folder is empty and within values.yaml file
This is going to provide the values for the templates and we can have hierarchical value, this is of json format.
I can read any value using the key hierarchy
We will be having detailed discussion on how to read a specific value or array of values later point
of time and chart.yaml we will be having various information like what API version, name, description
These three fields are mandatory
Additional to that, we can have other fields like keywords
type, what kube version to use and different dependencies we can add.
And who is the maintainer and all those values are optional.
While discussing about this specific file chart.yaml we will be having detailed discussion about
each and every field what will get added into this particular file.
So like this, we can have other files as well, like license, readme.md, values.yaml, values.schema.json
crds folder and templates. So license
It's an optional file that's going to have the license information about this particular chart and readme
As the name suggests, it's a human readable text file where
We will be having information about this particular chart and values.schema.json
It's an optional file, but that's a very important file where
It is going to derive or drive how the structure of the values.yaml file will be
That is something like a schema definition file and another folder that we did not see it in the default chart that got created
That is crds that's going to have the customer resources that are required for this particular chart.
So we use the chart create command to create the chart
And I am going to use this same folder structure and go ahead and create the chart from the beginning
for that particular purpose I will be removing this folder.
That is the templates folder and all its content so that I can create everything right from the beginning.
So within templates, I do not have any content, within charts also, we don't have any content.
So I will be going ahead and modifying the charts.yaml and values.yaml file and start
creating our first template in our next lecture.
So in a quick summary, we discussed about how to use helm create chart command and create the file
structure so that we can start proceeding from this particular point to create our own custom chart.