What is the difference between `helm search repo` and `helm search hub`?
answer
- One is local, one is remote
- Ask what corpus each one covers
- One result installs, the other is a web page
- Cached index files versus Artifact Hub's API
- Only search repo sees your private repositories
basics
~20 shelm search repo searches only the cached indexes of repositories you have added, works offline, and returns coordinates you can install immediately. helm search hub queries Artifact Hub over the network across thousands of public repositories and returns listing pages you cannot install from until you add the repository.
solid answer
~50 sThey search different corpora. `helm search repo` reads the `index.yaml` files already cached on your machine for the repositories in your `repositories.yaml`. It needs no network, includes your private repositories, and prints `NAME` values like `monitoring/monitoring-stack` that you can paste straight into `helm install`. Because it is served from the cache, its results are only as fresh as your last `helm repo update`. `helm search hub` goes the other way: it calls Artifact Hub's public search API and returns charts from thousands of public repositories, most of which you have not added. Its `URL` column points at the chart's Artifact Hub listing page, not at an installable coordinate - you still have to add the hosting repository before you can install. It also knows nothing about your internal repositories. Useful flags on the repo side: `--versions` to list every version rather than just the newest, `--regexp` for pattern matching, and `--devel` to include pre-releases.
code
bash · 5 lines# local: cached indexes of repos you added, offline, installable coordinates
helm search repo monitoring-stack --versions
# remote: Artifact Hub across public repositories, listing pages only
helm search hub monitoring-stackgo deeper
Recall that one searches what you have added locally and the other searches the public Artifact Hub. Know that the local one prints an alias/chart coordinate you can install with, and that it works with no network.
Explain the mechanics: search repo reads the cached index files, so its freshness equals your last update, while search hub makes a live API call across public repositories your client knows nothing about.
Turn an empty result into a diagnosis - repository not added, cache stale, pre-release hidden, or only newest versions shown - and know which flag or command settles each case without guessing.
Own the discovery story: Helm has no global chart namespace, so decide how your organisation publishes an internal catalogue and how teams find approved charts instead of each engineer curating their own alias list.
### Two commands, two corpora The word "search" hides a hard boundary. One command searches *your* configured world; the other searches *the public* world. They share a verb and almost nothing else. **`helm search repo`** iterates the cached `index.yaml` files for every repository listed in your `repositories.yaml`, matching your term against chart names, keywords and descriptions. Three consequences follow directly: 1. **It is offline.** No request leaves the machine. On a plane, or on an air-gapped build host, it still works. 2. **It is exactly as fresh as your cache.** If you have not run `helm repo update`, a version published this morning is not in the results, and a chart deleted from the repository last week still is. Search freshness and install resolution are the same freshness, which is at least consistent: what search shows you is what install will find. 3. **It sees your private repositories**, because those are entries in your own config. The `NAME` column it prints - for example `monitoring/monitoring-stack` - is a real, installable coordinate: repository alias, slash, chart name. That string is what `helm install`, `helm upgrade`, `helm pull` and `helm template` all take. **`helm search hub`** makes a live HTTP call to Artifact Hub, the public index of published Helm charts (and other cloud-native artefacts). It searches across thousands of repositories that other people run, whether or not you have ever added any of them, and you can point it at a self-hosted Artifact Hub instance if your organisation runs one. What comes back is a listing: a URL to the chart's page on the hub, the chart version, the app version, and a description. ### The trap in the output That `URL` column is the single most common misreading. It is a *web page*, not a chart coordinate and not a repository URL. `helm install my-rel https://artifacthub.io/packages/helm/...` will not work. The workflow after a hub search always has a step in the middle: open the listing, find the repository URL the publisher documents, `helm repo add` it, `helm repo update`, and only then `helm search repo` or `helm install` against the coordinate you now own. (If the publisher distributes over a registry instead, you reference the chart directly by its `oci://` URL, which is its own topic - no repository to add and nothing for `search repo` to see.) ### The flags that matter on the repo side Searching for a version you know exists and getting nothing back is usually one of three things: - **Only the newest version is shown by default.** `--versions` expands the output to every version of every matching chart in the index. When you are deciding what to pin an 18-chart umbrella to, this is the flag you want. - **Pre-releases are hidden.** Anything like `4.12.0-rc.1` is excluded unless you pass `--devel`. This is the same rule that governs which version an unpinned install picks, so it is worth internalising once. - **Matching is looser than you think.** Search matches descriptions and keywords as well as names, so a broad term over a big internal repository returns noise; `--regexp` lets you anchor the pattern, and `-o json` makes the result parseable in a script. An empty result from `helm search repo` also has a fourth cause that is not about flags at all: no repositories added. On a fresh CI runner the search legitimately returns nothing because `repositories.yaml` is empty. ### Which one is actually asked for In day-to-day operations, `search repo` is the one you use constantly - to check what versions exist before pinning, to confirm the alias you typed is real, to see whether the version a colleague published has reached your cache. `search hub` is a discovery tool: "is there already a community chart for this?" It is the command people forget exists, and an interviewer asking about it is usually probing whether you understand that Helm's search has *no* central registry behind it by default - your searchable universe is exactly the set of repositories you chose to add. That is the real conceptual point behind the pair. Helm has no built-in notion of a global namespace of charts. A repository alias is a local nickname you invented; the same chart may be `monitoring/monitoring-stack` on your laptop and `internal-mon/monitoring-stack` on your colleague's, and neither name means anything to anyone else. Artifact Hub exists precisely because Helm itself does not provide that global view.
- `helm search repo` returns nothing for a chart you are certain exists. What are the possible causes?Either the repository was never added on this machine, or the cached index is stale and predates the chart's publication, or the version you want is a pre-release hidden without `--devel`, or you are searching for a version rather than a name and need `--versions` to see anything but the newest. Run `helm repo list` and `helm repo update` first - those rule out the two structural causes before you start fiddling with flags.
- Can you install directly from a `helm search hub` result?No. The URL in that output is the chart's Artifact Hub listing page, not a repository or a chart coordinate. You open the listing, take the repository URL the publisher documents, add it with `helm repo add`, refresh, and install from the local alias you just created. A chart distributed through a registry is referenced by its `oci://` URL instead, with no repository to add.
saying these in an interview costs you the question
- Thinks helm search repo queries the repository server live
- Tries to install from a search hub URL directly
- Believes search hub can find private internal charts
- Assumes search shows every version by default
- Says Helm has a central registry of all charts