Helm Components (Charts, Release, Repositories, & More)

Managing Kubernetes deployments can be quite a challenging task. Tasks such as managing application updates, rollbacks, dependencies, and configurations can be quite time-consuming and even prone to errors when done manually. Luckily, there is a tool that can significantly simplify and streamline such tasks - Helm.

Helm is a powerful tool that allows developers to package and deploy their applications quickly and easily. In this blog, we’ll discuss the role of Helm’s main components.

Helm Overview

Helm manages components called Charts, which are bundles containing the information required to create Kubernetes components. Some of the operations that Helm does include:

  • Creating charts
  • Packaging charts into archive files
  • Adding chart repositories
  • Installing and uninstalling charts
  • Controlling chart release cycles
  • Managing release metadata

This article will focus on the following main components: Releases, Repositories, and Metadata.

To learn more about Helm charts, how to create them, and their structure, check out this blog post: What are Helm Charts?

What is a Helm Release?

A Helm release is a deployment of a chart to a Kubernetes cluster. When Helm deploys a chart, it creates a release object that contains information about the release, such as the chart version, the release name, and the deployment timestamp. You can use the Helm CLI to manage releases, such as upgrading or rolling back to a previous version.

Creating a Helm Release

When a chart is applied to your cluster, a release is created. Consider the following command:

helm install my-wordpress-site bitnami/wordpress

We used the chart at bitnami/wordpress and named the release my-wordpress-site.

You might ask yourself, "What's the need for the release name item? Why not just use a shorter command like helm install bitnami/wordpress and be done with it?"

Well, one simple reason: Having a release name based on a chart makes installing multiple releases based on the same chart possible. For instance, we can launch a second WordPress website with a command such as:

helm install my-SECOND-wordpress-site bitnami/wordpress

Since they’re two different releases, they can be tracked separately and changed independently. Even though they’re based on the same chart, they are two entirely different entities as releases.

This can be useful in a lot of scenarios. For example, you could have a release for a WordPress website that your customers use and another release for a WordPress website that is only visible to your internal team of developers. They can experiment and add new features without breaking the main website.

Since the two releases are based on the same chart, once they get something working correctly on the development website, they can transfer it to the main website since it would work exactly the same, as the two websites are clones, built the same way.

What are Helm Repositories?

Helm repositories are collections of charts that can be used to deploy applications to Kubernetes clusters. Just like we can find all kinds of freely available projects on GitHub, we can find Helm charts in public repositories such as https://artifacthub.io/ repository.

If the actual developer of that project publishes charts, you will see an Official or Verified Publisher badge, and you should use those when available.

Adding Helm Repositories

To add a Helm repository, use the command:

helm repo add <NAME> <URL>

For example, if the repository URL is https://example.com/charts and the name is myrepo, the command would be:

helm repo add myrepo https://example.com/charts

Once added, you can search for and install charts from this repository using the helm search and helm install commands respectively. This makes it easy to access and utilize the charts available in the repository for your Kubernetes deployments. Helm repositories provide a convenient way to share and discover new charts.

Want a step-by-step guide on installing a WordPress website from a repository using Helm? Check out this blog: Helm Chart Tutorial: A Quick Guide to Working With Helm.

Release Metadata

Helm needs a place to save this data to keep track of what Helm did in a cluster, the releases installed, the charts used, revision states, and so on. Now it wouldn’t be too useful if it would save this on our local computer. If another person needs to work with our releases through Helm, they will need a copy of our data.

So, Helm does the smart thing and saves this metadata directly in our Kubernetes cluster as Kubernetes secrets. This way, the data survives as long as the Kubernetes cluster survives, and everyone from our team can access it. This ensures that Helm keeps track of every action executed in a cluster.

ENROLL in our Helm For Beginner'sCourse to learn other concepts, such as creating Helm Charts, adding dependencies in them, and distributing them.

Helm for Beginners | KodeKloud
Learn and get certified with simple and easy hands-on labs

Conclusion

Helm charts provide a standardized way of packaging and deploying applications, making it easier for teams to collaborate and share their work. It allows for easy versioning and rollback, ensuring you can always return to a previous version if necessary.

Overall, using Helm charts can save you time and effort while also helping you avoid errors and ensure the stability of your applications.

Want to learn more about Helm’s other important concepts and features? Watch this video.


More Helm articles: