Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve https://kubernetes-charts.storage.googleapis.com" is not a valid chart repository

Tags:

kubernetes

I am working on helm 2 and trying to deploy Tiller as pod.

>helm init --service-account tiller

But i am getting below Error: Error: error initializing: Looks like "https://kubernetes-charts.storage.googleapis.com" is not a valid chart repository or cannot be reached: Get https://kubernetes-charts.storage.googleapis.com/index.yaml: dial tcp 172.217.2.240:443: connect: connection timed out

Has anyone faced this error and if yes , what is the recommended way to overcome this for helm2?

like image 557
Rahul Kumar Avatar asked May 22 '20 11:05

Rahul Kumar


People also ask

What is Helm repo add?

Helm chart repositories are remote servers containing a collection of Kubernetes resource files. Charts are displayed in directory trees and packaged into Helm chart repositories. To deploy applications with Helm, you need to know how to manage repositories.

What happened helm init?

The helm init command has been removed. It performed two primary functions. First, it installed Tiller. This is no longer needed.

What is a helm chart?

Helm uses a packaging format called Charts. A Helm Chart is a collection of files that describe a set of Kubernetes resources. Like other package manager formats based on convention, Helm Charts follow a directory structure/tree. The Helm Charts can be archived and sent to a Helm Chart Repository.


5 Answers

Helm versions prior to 2.17.0 have the deprecated https://kubernetes-charts.storage.googleapis.com/index.yaml as the default stable repository, which no longer resolves. The new repo is https://charts.helm.sh/stable. You can choose to:

  1. Use the --stable-repo-url argument to specify the new repository:

    helm init --stable-repo-url https://charts.helm.sh/stable --service-account tiller
    
  2. Use the --skip-refresh argument and replace the stable repo:

    helm init --client-only --skip-refresh
    helm repo rm stable
    helm repo add stable https://charts.helm.sh/stable
    
  3. Upgrade helm to 2.17.0 or later.

like image 60
luis gonzalez Avatar answered Oct 21 '22 23:10

luis gonzalez


helm init --client-only --skip-refresh
helm repo rm stable
helm repo add stable https://charts.helm.sh/stable
like image 39
user70329 Avatar answered Oct 21 '22 22:10

user70329


update the urls like below solved my issue

Name : stable Old Location:https://kubernetes-charts.storage.googleapis.com
New Location:https://charts.helm.sh/stable

Name : incubator Old Location:https://kubernetes-charts-incubator.storage.googleapis.com New Location:https://charts.helm.sh/incubator

Reference:https://helm.sh/blog/new-location-stable-incubator-charts/

like image 37
Jomcy Pappachen Avatar answered Oct 21 '22 22:10

Jomcy Pappachen


repo is not avail. use below repo.

k8scka@master:~$ helm3 repo add stable https://charts.helm.sh/stable
"stable" has been added to your repositories
k8scka@master:~$
like image 27
Rosaiah Chebrolu Avatar answered Oct 21 '22 21:10

Rosaiah Chebrolu


I had this issue when targeting a helm_release resource in Terraform that was using the helm2 provider. We tracked it down to the root cause being a missing ~/.helm/repository/repositories.yaml file that helm2 uses, which must be also used by the Terraform provider.

The file can be recreated with a helm v2 client with

helm2 init --stable-repo-url https://charts.helm.sh/stable --client-only

There is no need to keep the helm v2 client afterwards if you only want to use Terraform.

like image 2
Waddles Avatar answered Oct 21 '22 21:10

Waddles