skip to content

What does `helm pull --version` fetch, and when would you pull a chart instead of installing it straight from the repository?

level: middleimportance: should knowfreq 45%

answer

  1. Download without touching the cluster
  2. The install command minus the install
  3. Inspect, diff, mirror, render offline
  4. Ask what an omitted version selects
  5. Newest non-prerelease in the cached index

basics

~20 s

helm pull downloads a chart's packaged .tgz from a repository to the local filesystem without touching a cluster, with --version selecting an exact published version instead of the newest. Pull when you need to inspect, diff, mirror or vendor the exact artefact rather than install it.

solid answer

~50 s

`helm pull monitoring/monitoring-stack --version 4.11.2` resolves that coordinate in the cached repository index and downloads the packaged chart into the current directory; `--untar` (with `--untardir`) expands it into a source tree, `-d` chooses a destination, and `--repo <url>` lets you pull without adding the repository first. Nothing about a cluster is involved. Reasons to pull rather than install: reading the real templates and default values before you trust a chart, diffing 4.11.2 against 4.10.6 to see what an upgrade changes, mirroring an exact tarball into an internal store for an air-gapped or reproducible build, or feeding `helm template` in CI. The `--version` half matters everywhere, not just here: **omit it and Helm silently picks the newest non-prerelease version in the index at that moment**, so an unpinned pipeline changes what it deploys without anyone editing anything. `--version` also accepts a range, but only an exact string is a pin.

code

bash · 3 lines
bash
helm pull monitoring/monitoring-stack --version 4.11.2 --untar --untardir ./vendor
helm show values monitoring/monitoring-stack --version 4.11.2 > baseline-values.yaml
helm template mon ./vendor/monitoring-stack -f baseline-values.yaml

go deeper

for a junior

Know that pull downloads the packaged chart to disk and does nothing to a cluster, and that --version picks a specific published version while --untar unpacks it for reading.

for a middle

Explain what an omitted version resolves to - newest non-prerelease in the cached index, right now - and why that makes an unpinned command non-reproducible across machines and across time.

for a senior

Show the workflow you actually run before an upgrade: fetch both versions, diff the rendered output, and pin the exact version in the deploy path so a change to what ships is always a reviewable edit.

for a principal

Own the supply story - whether charts are consumed straight from upstream or mirrored into an internal store, what that buys in availability and reviewability, and what the mirror costs you in freshness and maintenance.

### What pull actually does `helm pull` is the download half of `helm install` with the cluster half removed. It resolves a chart coordinate against your cached repository index, finds the download URL for the requested version, and writes the packaged `.tgz` to disk. No Kubernetes API server is contacted, no release record is created, no templates are rendered. The options are small and worth knowing exactly: - **`--version`** selects which published version to fetch. Without it you get the newest non-prerelease version the cached index knows about. - **`--devel`** allows pre-release versions such as `4.12.0-rc.1` to be considered. - **`--untar`**, optionally with **`--untardir`**, expands the tarball into a chart directory rather than leaving it packed. - **`-d` / `--destination`** chooses where the file lands. - **`--repo <url>`** pulls from a repository URL directly, without an entry in your configuration - which also means without a cached index or an alias. - **`--prov`** fetches the provenance file alongside the package, and **`--verify`** checks it; verification itself is a separate subject from repository consumption. The same auth and TLS flags a private repository needs are accepted here too, which is what makes `--repo` plus credentials a workable pattern for automation that should not persist configuration. ### Why you would pull rather than install **To read the thing before you run it.** A chart from a repository is opaque until you look inside. Pulling and untarring gives you the actual `templates/`, the real default `values.yaml`, and the dependency declarations - for a monitoring-stack chart with three subcharts, that is the only honest way to see what a single install will create. (`helm show values` and `helm show chart` answer narrower versions of the same question straight from the repository without unpacking.) **To diff two versions.** Pull 4.10.6 and 4.11.2 side by side and read the difference. Release notes describe intent; the packaged chart is what will actually be applied. This is the standard homework before an upgrade to a chart you do not own. **To mirror or vendor.** An air-gapped environment, or a build that must be reproducible next year, cannot depend on a repository still serving a version. Pulling the exact `.tgz` and storing it in an internal artefact store fixes the byte-for-byte input. The same move helps when an upstream repository is slow or flaky: your pipeline stops making a network call to someone else's server on every deploy. **To render offline.** `helm template ./monitoring-stack` against a pulled directory produces manifests for review, policy checking or a diff, with no repository access at all. ### The pinning half, which is the part that bites Omitting `--version` is a decision, not a default you can ignore. Helm resolves the coordinate to the newest non-prerelease version present in your cached index **at the moment the command runs**. Two things follow. First, an unpinned install or pull is not reproducible. The same pipeline, unchanged, deploys chart 4.10.6 in the morning and 4.11.2 in the afternoon because someone published in between. Nothing in your repository changed; nothing in review shows a difference; the deployed application did change. For a PDF-signing service where a chart bump alters resource requests or a probe path, that is an unattributable incident. Second, the resolution is against the *cached* index, so an unpinned command on a stale cache picks the newest version you happen to know about - which makes the behaviour depend on when each machine last refreshed. Two engineers running the identical command get different charts. Pinning removes the whole class of problem: an exact `--version` either resolves or fails loudly, and failing loudly is the good outcome. `--version` accepts a constraint expression as well as an exact string, so a range is possible; a range is a *policy*, not a pin, and it reintroduces the moving target if you use it in a deploy path. Range semantics themselves are a general versioning topic. One boundary worth being precise about: pinning `--version` pins the chart artefact you fetch. Whether that chart's own bundled dependencies are equally fixed is a property of how the chart was packaged, not of your pull command. On an 18-chart umbrella, that distinction is the difference between "we know what we deployed" and "we know what the top of it was called". ### The everyday sequence In practice the reviewed workflow is: search for the versions that exist, pull the specific one, read or diff it, then install that same exact version - never a bare coordinate that resolves to whatever is newest at deploy time.

  • What exactly does Helm choose when `--version` is omitted for a repository chart?
    The newest non-prerelease version present in the cached index at the moment the command runs. Pre-releases are excluded unless `--devel` is passed, and because resolution reads the cache, the answer also depends on when that machine last ran `helm repo update`. That is why two engineers running the identical unpinned command can end up with different charts.
  • Why would a team mirror pulled chart tarballs into their own artefact store?
    To make the input reproducible and available: an upstream repository can go away, stop serving an old version, be slow, or be unreachable from an air-gapped network. Storing the exact `.tgz` fixes the bytes the build consumes and removes a third-party network dependency from every deploy. It also gives a single place to apply whatever review or scanning the organisation requires before a chart is usable.
  • Is `helm pull --untar` a substitute for reading `helm show values`?
    They answer different questions. `helm show values` prints the chart's default values file straight from the repository, which is what you want when you only need to know which keys exist. Untarring gives you the whole source tree - templates, helpers, bundled dependencies - which is what you need to see what will actually be created, or to diff two versions properly.

saying these in an interview costs you the question

  • Thinks helm pull installs or contacts the cluster
  • Believes an omitted --version reuses the last installed version
  • Assumes unpinned installs are reproducible across machines
  • Says a version range is the same as a pin
  • Cannot name a reason to fetch a chart without installing

context