Create and Manage Helm Chart Repositories

MouliVeera
2 min readMar 5, 2024

This page outlines the steps to create and manage Helm chart repositories using GitHub Pages and AWS S3 (or any cloud storage buckets). Helm is a package manager for Kubernetes that simplifies the deployment and management of applications.

Prerequisites:
- GitHub account
- Basic knowledge of Helm and Kubernetes
- GitHub pages or AWS S3 or alternative cloud storage bucket (optional)

Create Helm Chart Repositories

Create a New GitHub Repository:
Go to GitHub and create a new repository to host your Helm charts. Let’s call it my-helm-repo.

Clone the Repository:
Clone the newly created repository to your local machine.

git clone git@github.com:<USERID>/<REPO_NAME>.git

For example:
git clone git@github.com:mouliveera/demo-repo.git

Create a Helm Chart: Create a Helm chart for your application or use an existing one.

helm create my-helm-repo

Package the Helm Chart:
Package your Helm chart using the helm package command, specifying the path to the chart directory.

helm package my-helm-repo

Publish the Chart:
Move the packaged .tgz file into the cloned repository directory.

Generate and Update the Index File:
Run the helm repo index in the repository directory to generate/update the index.yaml file.

helm repo index my-helm-repo --url https://<GITHUB_USERNAME>.github.io/<REPO_NAME>

Example:
helm repo index my-helm-repo --url https://mouliveera.github.io/my-helm-repo

Commit and Push Changes:

  • Commit the changes including the chart package file and the updated index.yaml.
  • Push the changes to the GitHub repository.

Enable GitHub Pages:

  • Go to your GitHub repository settings.
  • Under the “GitHub Pages” section, choose the main branch as the source and / as the root directory.

Accessing the Repository:
After a few moments, GitHub Pages will publish your repository. You can access your Helm repository at https://<username>.github.io/<repository_name>.

Add the Helm Repository:
Run the below command to add your Helm repository to Helm’s list of repositories.

helm repo add <repo_name> https://<username>.github.io/<repository_name>

Example:
helm repo add my-helm-repo https://mouliveera.github.io/my-helm-repo

Update the Repository Index Locally:
Run helm repo update to update Helm’s local list of repositories.

Test and Install Your Chart:

  • Validate the Helm chart by running helm template my-helm-repo.
  • Install the Helm chart using helm install my-helm-repo.

Try demo repo for your testing: https://github.com/mouliveera/demo-repo

--

--

MouliVeera

Mouli is a seasoned DevOps Engineer with expertise in designing and optimising CI/CD pipelines, containerisation with Docker and Kubernetes.