DEV Community

Suleiman Dibirov
Suleiman Dibirov

Posted on

Using Helm Repositories

Helm repositories are a core component of the Helm ecosystem, allowing you to discover and use pre-built Charts shared by the community or your organization. Helm repositories are collections of Charts that can be hosted publicly or privately, enabling developers to reuse standardized packages for their Kubernetes applications.

In this section, we’ll cover how to find, add, and manage Helm repositories, as well as some popular repositories you can use right away.

1. Adding a Helm Repository

To use Charts from a Helm repository, you need to first add it to your local Helm installation. The command to add a repository is straightforward:

helm repo add <repo-name> <repo-url>
Enter fullscreen mode Exit fullscreen mode

For example, to add the Bitnami repository, which hosts Charts for popular open-source applications, you would use the following command:

helm repo add bitnami https://charts.bitnami.com/bitnami
Enter fullscreen mode Exit fullscreen mode

This will allow you to search for and install Charts from the Bitnami repository.

2. Updating Repositories

Helm repositories are constantly being updated with new versions of Charts. To ensure that you’re working with the latest versions, you should regularly update your local repository index:

helm repo update
Enter fullscreen mode Exit fullscreen mode

This command fetches the latest metadata from all the repositories you’ve added, ensuring that you have access to the newest Charts and updates.

3. Searching for Charts

Once you’ve added repositories, you can search for specific Charts. Helm provides a command to search across all added repositories:

helm search repo <search-term>
Enter fullscreen mode Exit fullscreen mode

For example, to search for all Nginx-related Charts, you can use:

helm search repo nginx
Enter fullscreen mode Exit fullscreen mode

This will display a list of Charts with nginx in their names, including their version numbers and the repository they belong to.

4. Viewing Chart Details

Before installing a Chart, you may want to review its details. Helm allows you to inspect the metadata of a Chart with the following command:

helm show chart <repo-name>/<chart-name>
Enter fullscreen mode Exit fullscreen mode

For example:

helm show chart bitnami/nginx
Enter fullscreen mode Exit fullscreen mode

This command displays information such as the Chart version, app version, maintainers, and a brief description.

You can also view the default values for the Chart using:

helm show values <repo-name>/<chart-name>
Enter fullscreen mode Exit fullscreen mode

This command outputs the values.yaml file used by the Chart, allowing you to see all the configurable options.

5. Installing a Chart from a Repository

Once you’ve found the right Chart, you can install it into your Kubernetes cluster directly from the repository. The syntax is similar to installing a local Chart, but this time you specify the repository and Chart name:

helm install <release-name> <repo-name>/<chart-name>
Enter fullscreen mode Exit fullscreen mode

For example, to install an Nginx server from the Bitnami repository:

helm install my-nginx bitnami/nginx
Enter fullscreen mode Exit fullscreen mode

Helm will fetch the Chart from the repository, apply any default or overridden values, and deploy the resources to your cluster.

6. Popular Helm Repositories

There are several well-known Helm repositories that provide high-quality, pre-built Charts for common applications. Some of the most popular include:

  • Bitnami: Hosts Charts for a wide variety of open-source applications such as Nginx, WordPress, MySQL, MongoDB, and more.

    • Add the repository:
    helm repo add bitnami https://charts.bitnami.com/bitnami
    
  • Artifact Hub: A centralized hub for Helm Charts, where you can find Charts from various organizations, communities, and cloud providers.

    • Add the Artifact Hub (requires searching for specific repositories on the hub).
  • Kubernetes Official: Maintains a collection of Helm Charts for official Kubernetes components and related software.

7. Hosting Your Own Helm Repository

If you want to share your custom Helm Charts within your organization or with the broader community, you can host your own Helm repository. There are multiple ways to do this:

a. Using Helm's index.yaml

Helm repositories are essentially HTTP servers that host a index.yaml file along with the packaged .tgz files for the Charts. You can create a simple Helm repository by generating this index file.

  1. Package Your Charts: Package all the Charts you want to host using the helm package command.
   helm package ./my-chart
Enter fullscreen mode Exit fullscreen mode
  1. Create the index.yaml File: Helm provides a command to generate an index file for your repository.
   helm repo index . --url <your-repo-url>
Enter fullscreen mode Exit fullscreen mode

This will generate an index.yaml file that lists all the available Charts and their versions. The --url option specifies the base URL where the Charts will be hosted.

  1. Host the Repository: Upload the index.yaml file and .tgz Chart packages to any HTTP server (such as GitHub Pages, S3, or a simple web server).

  2. Add the Repository: Others can now add your repository to their Helm installation using the helm repo add command.

b. Using ChartMuseum

For a more advanced repository, you can use ChartMuseum, an open-source Helm Chart repository server that offers advanced features like authentication, API access, and version management.

You can deploy ChartMuseum in your Kubernetes cluster or host it externally. Once it's set up, you can push your Charts to it and manage them centrally.

8. Managing Repositories

You can list all the repositories added to your Helm installation using:

helm repo list
Enter fullscreen mode Exit fullscreen mode

This will show all the repositories currently available, along with their URLs.

If you need to remove a repository, use the following command:

helm repo remove <repo-name>
Enter fullscreen mode Exit fullscreen mode

This can be useful if you no longer need access to a specific repository or want to clean up unused repositories.


Helm repositories give you access to a wealth of pre-configured applications and enable you to share your own Charts with others. By leveraging repositories, you can simplify the deployment process and ensure consistency across environments. Whether you're using a public repository like Bitnami or hosting your own internal Charts, Helm's repository system is a key part of efficient Kubernetes application management.

In the final section, we'll wrap up with some advanced features and additional resources for getting the most out of Helm.

Top comments (0)