45

I have a helm repo:

helm repo list

NAME URL

stable https://kubernetes-charts.storage.googleapis.com

local http://127.0.0.1:8879/charts

and I want to list all the charts available or search the charts under stable helm repo.

How do I do this?

No command so far to list available charts under a helm repo or just verify that a chart exists.

peterh
  • 11,875
  • 18
  • 85
  • 108
uberrebu
  • 3,597
  • 9
  • 38
  • 73

15 Answers15

60

First, always update your local cache:

helm repo update

Then, you can list all charts by doing:

helm search repo

Or, you can do a case insensitive match on any part of chart name using the following:

helm search repo [your_search_string]

Lastly, if you want to list all the versions you can use the -l/--version argument:

# Lists all versions of all charts
helm search repo -l 

# Lists all versions of all chart names that contain search string
helm search repo -l [your_search_string]
rouble
  • 16,364
  • 16
  • 107
  • 102
  • `helm search repo` doesn't work. Outputs `Usage: helm search [command]` – Snowcrash Jan 06 '21 at 18:28
  • The same for `# Lists all versions of all charts helm search repo -l ` – Snowcrash Jan 06 '21 at 18:29
  • 1
    @Snowcrash. Works for me: version.BuildInfo{Version:"v3.7.2", GitCommit:"663a896f4a815053445eec4153677ddc24a0a361", GitTreeState:"clean", GoVersion:"go1.17.3"} – paiego Feb 01 '22 at 00:48
15

You can use helm search to search for Helm charts. There is an interesting option that you can pass to helm search that will let you use regex to search for Charts. That way, you can pass a regex that matches with any Chart name. For example

helm search repo -r ".*"

That will show all the Charts on all repositories.

You can additionaly use --devel flag with above command to show development version charts

gndps
  • 461
  • 3
  • 13
Jose Armesto
  • 12,794
  • 8
  • 51
  • 56
5

As of Helm v3x, seems like the easiest method would be to:

helm search repo $repoName -l

Should produce a list of packages within the specified repo ($repoName); then, to further specify a package name:

helm search repo $repoName/$packageName

That should narrow results down to something manageable.

todd_dsm
  • 918
  • 1
  • 14
  • 21
3

I believe you're looking for:

helm search

In your case

helm search stable

or

helm search local

EDIT: Doc link: https://helm.sh/docs/using_helm/#helm-search-finding-charts

harbinja
  • 918
  • 8
  • 15
3

you can do a "helm search repo" . I am using helm version.BuildInfo{Version:"v3.0.1"} Hope it helps

Sagar
  • 61
  • 2
3

You can use grep as well as follows.

Get a list of all of the repos added.

helm repo list

Update your repos

helm repo update

Search for 'nginx' in all of the repos that you have

helm search repo nginx

List all the packages in bitnami

helm search repo bitnami

Finally you can use grep to filter out in a given repo

helm search repo bitnami | grep nginx
VivekDev
  • 20,868
  • 27
  • 132
  • 202
2

Having gone through all the answers in this question, the answer seems to be:

You can't.

Snowcrash
  • 80,579
  • 89
  • 266
  • 376
1

To list all the available charts for a specific application, you can try below command:

  • Repository - stable
  • Application - sample-app

    helm search stable/sample-app -l

1

Helm 2: helm search -r '\vstable/.*\v' (1)

Helm 3: helm search repo -r '\vstable/.*\v' (2)

From the documentation:

To look for charts with a particular name (such as stable/mysql), try searching using vertical tabs (\v). Vertical tabs are used as the delimiter between search fields.

Julien Carsique
  • 3,915
  • 3
  • 22
  • 28
1

You don't actually need helm at all to accomplish this.

Let's say you're trying to find the list of packages in https://charts.helm.sh/stable/.

Just add index.yaml to the URL, so you get https://charts.helm.sh/stable/index.yaml. This contains a list of everything in the repo.

Additionally, you can use yq to get this data in a more useful format:

$ curl https://charts.helm.sh/stable/index.yaml | yq --compact-output '.entries | to_entries | .[].value[] | {name, version}'
{"name":"acs-engine-autoscaler","version":"2.2.2"}
{"name":"acs-engine-autoscaler","version":"2.2.1"}
{"name":"acs-engine-autoscaler","version":"2.2.0"}
...
flaviut
  • 2,007
  • 3
  • 23
  • 32
0

Add the repo and search it:

$helm add <repo> <repo url>

$helm search --regexp <repo>/*

Replace repo with the repo you want to search, say jetstack

$ helm search --regexp jetstack/*
Margach Chris
  • 1,404
  • 12
  • 20
  • `helm search --regexp some-repo/* zsh: no matches found: some-repo/*` – Snowcrash Jan 06 '21 at 18:31
  • @Snowcrash I am using helm ```v3.2.1``` and this flag seems to have been removed. if you want to search for something, just use ```helm search repo ```. but you still need to add the repos you want to search from. – Margach Chris Jan 07 '21 at 06:41
0

Simply helm search repo to list all the charts and helm search repo search_text to list charts based on the input search text.

For Example: helm search repo my_chart

TechFriend
  • 51
  • 4
0

This helped me:

  • helm repo update: for updating the repos.
  • helm search repo <repo_name>: for seeing all the helm charts that are in <repo_name> repo.
Sahadat Hossain
  • 3,583
  • 2
  • 12
  • 19
0

Manual and hacky way:

  • helm repo update
  • Find the cache path for your operating system at the bottom of the docs https://helm.sh/docs/helm/helm/
  • Find the file <repository_name>-charts.txt
Gian97
  • 1
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 18 '22 at 09:28
0

One more thing to add: If you'd like to list the develop versions (like 1.0.1-1234), you need one more parameter: --devel

For example:

helm search repo ingress-nginx --devel -l

Otherwise the develop versions will not be listed.

civic.LiLister
  • 2,087
  • 16
  • 13