Friedrich Ewald My Personal Website

Quick introduction to using and serving Helm Charts

For this posting I assume that kubectl and helm are installed and working. If unsure, this can be checked via kubectl get pods --all namespaces which should return a pod with the name tiller-deploy-[...]. For these examples I am using minikube. To create an initial helm chart, run the command helm create <name>. This creates a new chart template with the name <name>. Of course this should be replaced with the actual name. How to create the actual chart will be part of another blog entry. To package that chart, run the following.

$ cd mychart/
$ helm package .
A webserver for hosting Charts is the Chartmuseum. Generally every server which can serve static files will work fine although the index.yaml has to be created. The quickest way for testing is to deploy the Chartmuseum via helm itself:
$ helm install --set env.open.DISABLE_API=false stable/chartmuseum
It is important to note that DISABLE_API needs to be set to false, otherwise no uploads will be possible. To upload the packaged chart to Chartmuseum, type the following curl command:
$ curl --data-binary "@mychart-0.1.0.tgz" http://localhost:8080/api/charts
Alternatively, the helm-push-plugin can be used with:
helm plugin install https://github.com/chartmuseum/helm-push
To use the chart in helm, the repository has to be registered with helm:
$ helm repo add chartmuseum http://localhost:8080
And then the chart can be pushed via:
$ helm push mychart/ chartmuseum
More information can be found in the Chartmuseum documentation. Lastly, this guide provides step-by-step information for using a helm chart repository. To test the newly uploaded chart the repositories need to be updated first with:
$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Skip local chart repository
...Successfully got an update from the "chartmuseum" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈ Happy Helming!⎈
Note: At the time of writing, helm does not automatically update the charts before installing and thus it is required to update before a search can occur. This feature is proposed for Helm 3. To show all charts of the helm simply run:
$ helm search chartmuseum/
You should now see your newly created chart.


About the author

is an experienced Software Engineer with a Master's degree in Computer Science. He started this website in late 2015, mostly as a digital business card. He is interested in Go, Python, Ruby, SQL- and NoSQL-databases, machine learning and AI and is experienced in building scalable, distributed systems and micro-services at multiple larger and smaller companies.