helm: Error: INSTALLATION FAILED: failed to download

Output of helm version:

$ helm version
version.BuildInfo{Version:"v3.7.1", GitCommit:"1d11fcb5d3f3bf00dbe6fe31b8412839a96b3dc4", GitTreeState:"clean", GoVersion:"go1.16.9"}

Output of kubectl version:

$ sudo k3s kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.5+k3s2", GitCommit:"724ef700bab896ff252a75e2be996d5f4ff1b842", GitTreeState:"clean", BuildDate:"2021-10-05T19:59:14Z", GoVersion:"go1.16.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.5+k3s2", GitCommit:"724ef700bab896ff252a75e2be996d5f4ff1b842", GitTreeState:"clean", BuildDate:"2021-10-05T19:59:14Z", GoVersion:"go1.16.8", Compiler:"gc", Platform:"linux/amd64"}

Cloud Provider/Platform (AKS, GKE, Minikube etc.):

$ sudo k3s --version
k3s version v1.21.5+k3s2 (724ef700)
go version go1.16.8

Steps to reproduce failure:

  • Use a fresh Ubuntu 20.04 server edition installation with packages up-to-date
  • $ curl -sfL https://get.k3s.io | sh -
  • $ alias k="sudo k3s kubectl"
  • $ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
  • $ chmod 700 get_helm.sh
  • $ ./get_helm.sh
Downloading https://get.helm.sh/helm-v3.7.1-linux-amd64.tar.gz
Verifying checksum... Done.
Preparing to install helm into /usr/local/bin
helm installed into /usr/local/bin/helm
  • $ helm repo add rancher-stable https://releases.rancher.com/server-charts/stable
  • k create namespace cattle-system
  • $ helm repo add jetstack https://charts.jetstack.io
  • $ export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
  • $ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "jetstack" chart repository
...Successfully got an update from the "rancher-stable" chart repository
Update Complete. ⎈Happy Helming!⎈
  • $ sudo helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.6.0 --set installCRDs=true
Error: INSTALLATION FAILED: failed to download "jetstack/cert-manager" at version "v1.6.0"

What can I do to troubleshoot this?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 7
  • Comments: 23 (8 by maintainers)

Most upvoted comments

I tried this and it worked: helm repo update and then run the install command. helm install ------

I am having the same issue pulling a chart from a GitLab registry. The yaml file lists the chart and following the URL leads to the expected file, but helm cannot locate the chart. Debug output as follows with proper names redacted:

 helm install pis "team/mychart" --debug
install.go:178: [debug] Original chart version: ""
Error: INSTALLATION FAILED: chart "mychart" matching  not found in teamindex. (try 'helm repo update'): no chart version found for mychart-
helm.go:88: [debug] no chart version found for mychart-
helm.sh/helm/v3/pkg/repo.IndexFile.Get
        helm.sh/helm/v3/pkg/repo/index.go:218
helm.sh/helm/v3/pkg/downloader.(*ChartDownloader).ResolveChartVersion
        helm.sh/helm/v3/pkg/downloader/chart_downloader.go:247
helm.sh/helm/v3/pkg/downloader.(*ChartDownloader).DownloadTo
        helm.sh/helm/v3/pkg/downloader/chart_downloader.go:89
helm.sh/helm/v3/pkg/action.(*ChartPathOptions).LocateChart
        helm.sh/helm/v3/pkg/action/install.go:753
main.runInstall
        helm.sh/helm/v3/cmd/helm/install.go:194
main.newInstallCmd.func2
        helm.sh/helm/v3/cmd/helm/install.go:125
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/cobra@v1.2.1/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/cobra@v1.2.1/command.go:974
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/cobra@v1.2.1/command.go:902
main.main
        helm.sh/helm/v3/cmd/helm/helm.go:87
runtime.main
        runtime/proc.go:225
runtime.goexit
        runtime/asm_amd64.s:1371
chart "mychart" matching  not found in team index. (try 'helm repo update')
helm.sh/helm/v3/pkg/downloader.(*ChartDownloader).ResolveChartVersion
        helm.sh/helm/v3/pkg/downloader/chart_downloader.go:249
helm.sh/helm/v3/pkg/downloader.(*ChartDownloader).DownloadTo
        helm.sh/helm/v3/pkg/downloader/chart_downloader.go:89
helm.sh/helm/v3/pkg/action.(*ChartPathOptions).LocateChart
        helm.sh/helm/v3/pkg/action/install.go:753
main.runInstall
        helm.sh/helm/v3/cmd/helm/install.go:194
main.newInstallCmd.func2
        helm.sh/helm/v3/cmd/helm/install.go:125
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/cobra@v1.2.1/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/cobra@v1.2.1/command.go:974
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/cobra@v1.2.1/command.go:902
main.main
        helm.sh/helm/v3/cmd/helm/helm.go:87
runtime.main
        runtime/proc.go:225
runtime.goexit
        runtime/asm_amd64.s:1371
INSTALLATION FAILED
main.newInstallCmd.func2
        helm.sh/helm/v3/cmd/helm/install.go:127
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/cobra@v1.2.1/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/cobra@v1.2.1/command.go:974
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/cobra@v1.2.1/command.go:902
main.main
        helm.sh/helm/v3/cmd/helm/helm.go:87
runtime.main
        runtime/proc.go:225
runtime.goexit
        runtime/asm_amd64.s:1371

Update: I believe it had to do with the fact that we are using semantic versioning and are currently on a beta version. Adding the explicit version number 0.0.0-dev... retrieved the right chart.

I finally figured this out.

Granted I am setting this up in a lab so what I’m recommending isn’t ideal for production. But you can likely figure out what to do.

Create a /.kube/ directory (in the users profile path) and save the kube config there with the following command.

kubectl config view --raw > ~/.kube/config

Also, i setup k3s with a world readable kube config due to all the issues i had with sudo vs not sudo. curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644

I was able to add bitmani’s repo and install a Wordpress chart without issue.

This was a huge pain to fix. I think part of the issue is sudo/root/user context as someone briefly mentioned above. I took that idea and ran with it.

If anyone have also this problem make sure that you added the bitnami repro in the sudo context - not in the user context. I cannot use/install packages with helm without sudo (connection error) - but I could install the repos there. So I got the same errors as OP here.

Hi

As far as i can tell I have the same issues as OP and Choppra, I can not download any charts. I have been searching for an answer but can not find one.

Any updates on this? Anything I can do to help find the problem.

That error occurs when Helm fails to download the chart from the repository.

https://github.com/helm/helm/blob/accf82ba1c5fe32a0004f6ec7fd021b77fddf51f/pkg/action/install.go#L769

At a high level, helm install looks under your config directory for the cached index file for jetstack. Helm loads that file, then attempts to find the appropriate version. It then looks at the urls field to fetch the chart.

The top entry from https://charts.jetstack.io/index.yaml is this:

entries:
  cert-manager:
  - annotations:
      artifacthub.io/prerelease: "false"
      artifacthub.io/signKey: |
        fingerprint: 1020CF3C033D4F35BAE1C19E1226061C665DF13E
        url: https://cert-manager.io/public-keys/cert-manager-keyring-2021-09-20-1020CF3C033D4F35BAE1C19E1226061C665DF13E.gpg
    apiVersion: v1
    appVersion: v1.6.0
    created: "2021-10-26T14:24:00.043902639Z"
    description: A Helm chart for cert-manager
    digest: 0a28b158cff6019170ec6590dc28f9a1e4fe3ff537414874d56d424ad4afffc5
    home: https://github.com/jetstack/cert-manager
    icon: https://raw.githubusercontent.com/jetstack/cert-manager/master/logo/logo.png
    keywords:
    - cert-manager
    - kube-lego
    - letsencrypt
    - tls
    maintainers:
    - email: cert-manager-maintainers@googlegroups.com
      name: cert-manager-maintainers
    name: cert-manager
    sources:
    - https://github.com/jetstack/cert-manager
    urls:
    - charts/cert-manager-v1.6.0.tgz
    version: v1.6.0

Try to see if https://charts.jetstack.io/charts/cert-manager-v1.6.0.tgz resolves correctly on your machine. Failing that, try to look in your Helm config directory (helm env will show you where to look) for the index file and check its contents.

You can also use the --debug flag to see if more information about the error can be gleaned.