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/stablek 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)
I tried this and it worked:
helm repo updateand 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:
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/configAlso, 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 644I 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 installlooks under your config directory for the cached index file forjetstack. Helm loads that file, then attempts to find the appropriate version. It then looks at theurlsfield to fetch the chart.The top entry from https://charts.jetstack.io/index.yaml is this:
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 envwill show you where to look) for the index file and check its contents.You can also use the
--debugflag to see if more information about the error can be gleaned.