How to download a helm chart as a file for templating?

6.4k Views Asked by At

I can successfully push a helm chart to my harbor registry:

helm registry login -u robot$myrobo -p ... https://myregistry.mycompany.com
helm chart save mychart.gz myregistry.mycompany.com/myrepo/mychart:0.0.0-1 
helm chart push myregistry.mycompany.com/myrepo/mychart:0.0.0-1

I can pull the chart as well:

helm registry login -u robot$myrobo -p ... https://myregistry.mycompany.com
helm chart pull myregistry.mycompany.com/myrepo/mychart:0.0.0-1

Both commands succeed, but now I want to run

helm template name path/to/the/chart/I/just/downloaded -f another_file | further_processing

But path/to/the/chart/I/just/downloaded does not exist. It used to with helm 2 and another registry but now (with helm3) the file does not seem to be physically downloaded somewhere.

Except into the cache https://helm.sh/docs/topics/registries/#where-are-my-charts where I could probably parse the index.json and somehow get to my data but that is not desired. Is there a convenient way to access my files in the template command?

Proceedings:

Answer by Rafał Leszko:

I tried:

$ helm pull myregistry.mycompany.com/myrepo/mychart:0.0.0-1
Error: repo myregistry.mycompany.com not found
$ helm pull myrepo/mychart:0.0.0-1
Error: repo myrepo not found

I know there are no typos because helm chart pull myregistry.mycompany.com/myrepo/mychart:0.0.0-1 succeeds.

3

There are 3 best solutions below

1
On

Try the commands below. You will need to add repository of Hazelcast before pulling the chart.

helm repo add hazelcast https://hazelcast-charts.s3.amazonaws.com/
helm repo update
helm pull hazelcast/hazelcast
1
On

With Helm 3, you can use the helm pull command. It downloads the given helm chart to the current directory.

Try the following commands. There work fine.

helm pull hazelcast/hazelcast
helm template hazelcast hazelcast-*.tgz
1
On

you can try this command:

helm pull hazelcast/hazelcast --untar --destination ./chart