Create a Simple Helm Chart
Explore how to create a basic Helm chart by setting up the Chart.yaml file with essential metadata and defining Kubernetes resources such as Deployment and Service using Helm templates. Understand how to use built-in Helm objects and templating functions to manage dynamic values and environment variables. This lesson helps you develop a reusable and customizable Helm chart suitable for deploying applications on Kubernetes efficiently.
We'll cover the following...
The Chart.yaml file
Once all the template files are removed we can proceed with creating our chart from scratch. Firstly, we’ll define the metadata of our chart in the Chart.yaml file. Here is what we should have by default (for clarity, comments are skipped):
In the Chart.yaml file, only apiVersion, name, and version properties are required. All others are optional, but it’s a good practice to add more. Let’s replace the default values with a new one, as follows:
Next, let’s add more information like who’s the creator, where more information about a chart can be found, and some keywords:
We can now leave it as it is. If we need to know what other options are available we can check the official documentation.
Helm templates
After filling in the necessary data in the Chart.yaml file we can move on to defining Kubernetes resources. In this part, we’ll define two resources: Deployment and Service. Later on, we’ll add more of them.
Our goal is to create the following resources using Helm:
For the front-end application, both resource definitions would look similar with really small changes.
Since this is a Helm course that focuses primarily on Helm features, most of the time ...