Sub topic 7
Pulling, inspecting and installing a chart
This chapter assumes you have Helm 3.8 or later, can read Chart.yaml, and have already pushed a chart such as myapp version 0.1.0 to registry.example.com/charts. It also assumes you know how to log in with helm registry login.
From reference to release
Once a chart sits in an OCI registry, you can inspect it, download it, or install it directly. All three commands take an oci:// reference. The reference names the chart, so it ends in myapp. The version does not go in the URL. You pass it with --version.
helm show chart oci://registry.example.com/charts/myapp --version 0.1.0
helm pull oci://registry.example.com/charts/myapp --version 0.1.0
helm install my-release oci://registry.example.com/charts/myapp --version 0.1.0Helm uses the version as the registry tag, so --version 0.1.0 fetches the tag 0.1.0.
Inspecting before you install
The helm show commands read the chart from the registry without installing it. Each one prints a different part of the chart.
| Command | Output |
|---|---|
| `helm show chart` | The contents of `Chart.yaml` |
| `helm show values` | The default `values.yaml` |
| `helm show readme` | The chart's README |
| `helm show all` | All of the above plus CRDs |
Reading the default values first tells you which settings you can override.
helm show values oci://registry.example.com/charts/myapp --version 0.1.0 > my-values.yamlEdit my-values.yaml, then install with it:
helm install my-release oci://registry.example.com/charts/myapp \
--version 0.1.0 \
--values my-values.yamlPulling to disk
helm pull downloads the chart as a .tgz file in the current directory. This is useful when you want to review the templates or keep a copy.
helm pull oci://registry.example.com/charts/myapp --version 0.1.0
# Pulled: registry.example.com/charts/myapp:0.1.0
# Digest: sha256:...Add --untar to unpack the archive into a myapp/ directory. Add --destination ./charts to choose where the file goes. You can install the downloaded archive with helm install my-release ./myapp-0.1.0.tgz.
Upgrading
helm upgrade takes the same reference and --version flag. Always pass the version, so the new release uses the one you intend.
helm upgrade my-release oci://registry.example.com/charts/myapp --version 0.2.0Common mistakes
- Putting the tag in the URL, as in
oci://registry.example.com/charts/myapp:0.1.0. Use--versioninstead. - Leaving out the chart name.
oci://registry.example.com/chartspoints at a path, not a chart. - Omitting
--version. Helm then picks the latest tag it can resolve, which may not be the one you tested. - Running
helm repo addfor an OCI registry. OCI registries have noindex.yaml, so there is nothing to add. Log in withhelm registry logininstead. - Expecting
helm search repoto list OCI charts. It does not, because there is no index to search. You need to know the chart name.
Summary of the working model
An OCI reference identifies the chart by registry host, path and chart name. The version selects the tag. show reads, pull saves, install and upgrade deploy. All of them use the same reference form.
Exercise
You run helm install my-release oci://registry.example.com/charts/myapp:0.1.0 and it fails. What is wrong, and what is the corrected command?
Show answer
The version is written as a tag in the URL. Helm expects it in the --version flag. The corrected command is helm install my-release oci://registry.example.com/charts/myapp --version 0.1.0.
Exercise
You want to see which values you can override in a chart stored at oci://registry.example.com/charts/myapp at version 0.1.0, without installing it. Which command do you run?
Show answer
helm show values oci://registry.example.com/charts/myapp --version 0.1.0