Mastering Helm from Scratch: Part 2 – The Essentials of Helm Charts
Understanding Helm charts
Introduction
Welcome to Part 2 of Mastering Helm from Scratch. In this section, we’ll examine the core components of Helm, diving into the structure and types of charts.
Helm Chart Overview
A chart contains files and directories that follow the chart specification. These files describe the resources that Kubernetes will install.
Unpacked Charts
When you unpack a Helm chart, it appears as a directory with the chart's name having the following structure:
mychart/
├── Chart.yaml
├── values.yaml
└── templates/
Chart.yaml: This essential file contains metadata about the chart, including:
Name: The name of the chart.
Version: The version of the chart.
Description: A brief explanation of what the chart does.
Author: Information about the chart's creator.
Templates: A chart also includes templates, which are Kubernetes manifests that may contain templating directives. These templates allow for dynamic configuration during deployment.
Packed Charts
A packed Helm chart retains all the information from an unpacked chart but is compressed into a single file using tar
and gzip
. The naming convention for a packed chart includes the name and version, followed by the .tgz
suffix. For example:
mychart-1.2.3.tgz
Using packed and unpacked charts in Helm depends on your specific needs and scenarios. For instance, use packed charts for deployment, version control, and distribution, while unpacked charts are ideal for development, learning, and customization.
Charts reside in chart repositories. A well-known one is Bitnami. The chart installation process is similar to a command like apt-get install
for installing software on Ubuntu.
Conclusion
In this section, we’ve delved into the foundations of Helm and the essential components that make up a chart. By understanding the purpose of files like Chart.yaml, the role of templates, and the distinction between unpacked and packed charts, you now have a clearer picture of how Helm organizes and manages Kubernetes applications. This foundational knowledge is crucial as we move forward in our journey.
In the next part, we'll turn our attention to installing Helm itself and getting your hands dirty. Looking forward to seeing you in the next section!