Originally posted in my blog
For my personal projects, I use Github as a Helm repository. This is a simple way to share Helm charts with the community. In this post, I'll show you how to create a Helm repository using Github Pages either for personal use or for your organization.
Assumptions
This post will assume your already:
- Know what kubernetes is
- Have a basic understanding of helm
- Have a Github account and repository
- Have coded a Helm chart
Steps
Having all the above already in place, there are some things we need to do before we can use Github as a Helm repository. In particular, we need to enable Github Pages for our repository and add at least one index.html
file to it. According to this documentation, the index.html
file shouldn't be needed, but in reallity it is necessary for Helm to recognize the repository as a Helm repository.
Once having that and assuming our first chart is ready, we need to start packaging and adding it to the repository. The following steps will guide you through the process. All the directory structure assumed below is based on my own repository.
- Package the chart
$ helm package mychart
$ mv mychart-0.1.0.tgz helm/charts
- Update the index
$ helm repo index helm/charts --url https://boris.github.io/kubernetes/helm/charts
$ git add helm/charts/*
$ git commit -m "Add mychart-0.1.0"
$ git push
With the above we're now ready to add our repository to Helm and install our chart:
$ helm repo add boris https://boris.github.io/kubernetes/helm/charts
$ helm repo list
NAME URL
ealenn https://ealenn.github.io/charts
bitnami https://charts.bitnami.com/bitnami
kubernetes-dashboard https://kubernetes.github.io/dashboard/
argo https://argoproj.github.io/argo-helm
boris https://boris.github.io/kubernetes/helm/charts/
$ helm install mychart boris/mychart
Top comments (0)