Skip to content

Harbor helm chart management

Since version 1.6.0, Harbor allows users to manage helm chart.

If you are not familliar with Helm chart, please read the helm_chart.md first.

There are three options to push helm charts to Harbor

  1. Use the helm chartmuseum/helm-push plugin to push Helm chart to Harbor
  2. Use the Harbor web UI to upload and download the helm chart (a *.tgz file)
  3. Since version 3.8 Helm support pushing and pulling Charts from OCI compliant container registries such as Harbor.

In this tutorial, we choose option 3, as Chartmuseum is already marked as deprecated in Harbor.

As a helm chart repository, Harbor can work smoothly with Helm CLI. Run command helm version to make sure the version of Helm CLI is v3.8.1+.

# check helm version
helm version

# example output
version.BuildInfo{Version:"v3.9.4", GitCommit:"dbc6d8e20fe1d58d50e6ed30f09a04a77e4c68db", GitTreeState:"clean", GoVersion:"go1.17.13"}

# helm oci registry config 
helm registry login -u admin reg.casd.local

Push charts to repository server

# general form for pushing helm chart to harbor
helm push <char-package> oci://<harbor-url>/<project-name>

# an example of pushing chart
helm push hello-world-0.1.0.tgz oci://reg.casd.local/test

Pull and install charts from repository server

Below pulling command will pull the tgz file to your current directory. Unlike with the common helm command where you would first add a repo and then pull from it. With OCI registry, you can install a Chart with one line without adding the OCI registry repository(project) one by one.

# general form for pulling
helm pull oci://<harbor-url>/<project-name>/<chart-name> --version <chart-version>

# an example for pulling chart
helm pull oci://reg.casd.local/test/hello-world --version 0.1.0

# general form for installing a release from a remote chart
helm install <release-name> oci://<harbor-url>/<project-name>/<chart-name> --version <chart-version>

# an example for installing a release
helm install myrelease  oci://reg.casd.local/test/hello-world --version 0.1.0

Extra command for helm to interact with oci

Helm also provides various other subcommands for the oci:// protocol.

helm pull
helm show
helm template
helm install
helm upgrade

As OCI registry does not have the notion of repository, you can't do a search on the repo to get all the helm chart list

Onyxia API does not support OCI registry