Publish your own Helm chart using GitHub Pages

Helm is a package manager for Kubernetes (think apt or yum). It works by combining several manifests into a single package that is called a chart. Helm also supports chart storage in remote or local Helm repositories that function like package registries such as Maven Central, Ruby Gems, npm registry, etc.

Let’s assume you want to develop a Helm chart and publish it for others to consume. For example, I want to create a Helm chart for deploying Kafka using the Strimzi kafka operator and also create a Kafka topic as part of the Kafka deployment. Strimzi provides container images and Operators for running Kafka on Kubernetes.

Create a GitHub repository for publishing the Helm charts

Create a new repository with README.md on GitHub.

Make sure that master branch of the repository is published on GitHub Pages. In the settings section of your git repository, scroll down to Pages section and configure it as follow:

Create a helm chart from scratch (or copy your own)

As a pre-requisite, you need to have the Helm CLI installed and initialized. Please find here the instructions in case you haven’t install Helm client yet.

Now your repository looks like:

I have edited the generated helm default configuration to deploy Strimzi kafka operator and also to deploy a Kafka topic. Refer my git repository for the code.

Lint the chart

As a good habit, helm lint runs a series of tests to verify that
the chart is well-formed:

Create the Helm chart package

Create the Helm chart repository index

According to Helm:

A repository is characterized primarily by the presence of a special file called index.yaml that has a list of all of the packages supplied by the repository, together with metadata that allows retrieving and verifying those packages.

So, follow below the commands to create is the index.yaml file

Push the changes to GitHub

Configure Helm CLI

In order to use the newly created Helm chart, we need to configure the Helm client.

Test the Helm chart

Install Kafka using our Helm chart

Following step requires kubectlconfigured and a working kubernetes cluster with some default storage class.

Site Reliability Engineer linkedin.com/in/surenraju/