1. Introduction

Through the years, the Kubernetes container orchestration system has grown into a way to create and manage huge deployments. Because of this, having a way to handle the deployment definitions themselves has become a problem of its own. That’s the reason behind the development of Helm, the Kubernetes package manager. Not only does it handle charts similar to packages, but it can also list different versions of each.

In this tutorial, we explore chart versioning and ways to search and filter charts via Helm. First, we briefly refresh our knowledge about versions as it relates to charts and packages. After that, we see a way to install a particular chart version. Next, we go in-depth on chart searching, listing, and filtering. Finally, we conclude with methods to display chart versions.

We tested the code in this tutorial on Debian 12 (Bookworm) with GNU Bash 5.2.15 and Helm 3.14. Unless otherwise specified, it should work in most POSIX-compliant environments.

2. Package Versioning and Charts

Software gets outdated and upgraded. In this regard, packages and even their managers are no exception.

This process produces a natural trail of versions.

Separately, some software and packages present different versions based on aspects of the system they get installed on:

  • version
  • architecture
  • characteristics

For example, let’s check the listing of an APT package:

$ apt list iputils-ping
Listing... Done
iputils-ping/stable,now 3:20221126-1 amd64 [installed]

After the iputils-pingpackage name, we see the stable version class, a date that functions as the actual version, and the amd64 architecture.

Since charts are the packages of Helm, their versions depend on all the same factors:

URL                                                 CHART VERSION  APP VERSION  DESCRIPTION 
https://artifacthub.io/packages/helm/waldur/waldur  0.1.0          4.4.2        Waldur - Open-Source Cloud Marketplace
https://artifacthub.io/packages/helm/truecharts...  4.2.3          1.34.0       Open source, self-hostable watched list
https://artifacthub.io/packages/helm/kubeblocks...  0.8.0          1.18.0       Weaviate is an open-source vector database. It ...
https://artifacthub.io/packages/helm/djjudas21/...  2.2.8          2.1.18       Open-source online collaborative genealogy appl...
https://artifacthub.io/packages/helm/geek-cookb...  2.2.0          2.0.19       Open-source online collaborative genealogy appl...

So, let’s understand how to use and find this data.

3. Install Specific Chart Version

Although Helm uses the latest version of a chart by default, this might not always be desirable.

For example, some charts only work with specific Kubernetes versions. Since we might not want to change the entire setup for a given chart, picking another version can be beneficial.

So, to pick a specific version for installation, we can augment the usual install subcommand:

$ helm install --version <CHART_VERSION> stable/<CHART_NAME>

Critically, we should know CHART_VERSION. Although this is often available on the Web page of the repository or even the specific chart, there’s usually a more convenient method.

Like other package managers, Helm provides a way to find charts by criteria.

This functionality is implemented as the search subcommand with the –output (-o) and –max-col-width options, enabling output augmentation.

4.1. Artifact Hub

To begin with, we can check the Artifact Hub via the hub specification:

$ helm search hub

Effectively, this command lists all charts available for installation by default on new Kubernetes deployments. Currently, the item count on this list sits at more than twelve thousand.

4.2. Specific Repository

After adding a Helm repository, we can also specify it as part of the search:

$ helm search repo <REPO_NAME>

In this case, we check for all charts under the repo[sitory] with the name REPO_NAME.

Let’s list the current repositories so we can pick one as an example:

$ helm repo list
NAME                    URL
gabe565                 https://charts.gabe565.com
banzaicloud-stable      https://kubernetes-charts.banzaicloud.com

Now, we check all charts in the gabe565 repo:

$ helm search repo gabe565 | head
NAME                            CHART VERSION   APP VERSION                                     DESCRIPTION
gabe565/adguard-home            0.3.17          v0.107.44                                       Free and open source, powerful network-wide ads...
gabe565/ascii-movie             0.13.2          1.7.2                                           Star Wars movie SSH and Telnet server
[...]

Still, even this fairly small repository produces a list of 39 charts.

4.3. Specific Chart

Regardless of whether the source is a repository or the Artifact Hub, we can indicate the particular chart we want to find as well:

$ helm search repo|hub <REPO_NAME>/<CHART_NAME>

For example, let’s look for the satellite package in the banzaicloud-stable repo:

$ helm search repo banzaicloud-stable/satellite
NAME                            CHART VERSION   APP VERSION     DESCRIPTION
banzaicloud-stable/satellite    0.0.4                           A Helm chart for satellite

This search produces a single result.

4.4. Keywords

Notably, the keyword for the Helm search isn’t fixed and doesn’t need to contain the name of a repository or chart. In fact, many metadata points are checked:

$ helm search repo sate
NAME                            CHART VERSION   APP VERSION     DESCRIPTION
banzaicloud-stable/satellite    0.0.4                           A Helm chart for satellite

In this case, we don’t indicate a concrete repository or fully spell out the chart name. Still, only local metadata is part of the search.

Further, we can see results by DESCRIPTION as well:

$ helm search repo Enterprise
NAME                                    CHART VERSION   APP VERSION     DESCRIPTION
banzaicloud-stable/pipeline-enterprise  0.23.0          0.23.0          Banzai Cloud Pipeline Enterprise platform.
banzaicloud-stable/pipeline             2.0.0           0.82.0          A Helm chart for Banzai Cloud Pipeline, a solut...

Here, the last result only contains the word Enterprise in the hidden part of its description.

In addition, Helm offers a more advanced form of searching.

4.5. Regular Expressions

Similar to other filtering and searching mechanisms, the Helm search subcommand has support for regular expressions via the –regexp (-r) flag:

$ helm search repo --regexp "sa....ite"
NAME                            CHART VERSION   APP VERSION     DESCRIPTION
banzaicloud-stable/satellite    0.0.4                           A Helm chart for satellite

This is especially useful when it comes to searching within descriptions.

4.6. Versions

Notably, Helm provides several options that concern the version of charts.

First off, we can employ the basic –version option with a string to filter for specific versions:

$ helm search repo --version 0.0.4
NAME                                                    CHART VERSION   APP VERSION                                   DESCRIPTION
banzaicloud-stable/aws-autoscaling-exporter             0.0.4                                                         An aws autoscaling exporter Helm chart for Kube...
banzaicloud-stable/aws-spot-price-history-poller        0.0.4                                                         AWS Spot Price History Poller
[...]

Naturally, we can combine this with a specific keyword as well.

On the other hand, if we don’t add a –version, we can leverage the –devel flag, which includes development versions such as alpha, beta, and similar.

To check all available versions of charts, we add the –versions flag:

$ helm search repo --versions
NAME                                                    CHART VERSION   APP VERSION                                   DESCRIPTION
banzaicloud-stable/acquia-docs                          1.0.1           1.0.1                                         Acquia docs
banzaicloud-stable/acquia-docs                          1.0.0           1.0.0                                         Acquia docs
banzaicloud-stable/anchore-policy-validator             0.8.3           0.5.6                                         A Helm chart for anchore-policy-validator admis...
banzaicloud-stable/anchore-policy-validator             0.8.2           0.5.5                                         A Helm chart for anchore-policy-validator admis...
[...]

This way, we can get a full view of all charts and versions.

Let’s see an example with a particular chart:

$ helm search repo banzaicloud-stable/satellite --versions
NAME                            CHART VERSION   APP VERSION     DESCRIPTION
banzaicloud-stable/satellite    0.0.4                           A Helm chart for satellite
banzaicloud-stable/satellite    0.0.3                           A Helm chart for satellite
banzaicloud-stable/satellite    0.0.2                           A Helm chart for satellite

Now, we have a list of all –versions for the satellite chart of the banzaicloud-stable repository.

5. Summary

In this article, we talked about Helm chart versions and how to find and handle them.

In conclusion, although we usually want the latest version of many packages, sometimes chart listing and filtering by version helps when searching or creating a particular environment.

Comments are open for 30 days after publishing a post. For any issues past this date, use the Contact form on the site.