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

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.



Solution 1:[1]

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

Solution 2:[2]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rafał Leszko
Solution 2 Alex Gem