33

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?

Rahul Kumar
  • 353
  • 1
  • 3
  • 9

6 Answers6

68

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.

George
  • 2,860
  • 18
  • 31
luis gonzalez
  • 681
  • 5
  • 3
  • I experienced the same issue with dtzar/helm-kubectl:2.16.1 – Tim Schwalbe Dec 22 '20 at 10:21
  • 1
    Helm 2.17.0 also changed the default repo URL, so an alternate solution is to upgrade to Helm 2.17.0 (or 3). – bmaupin Dec 22 '20 at 14:10
  • I too faced the same problem while installing chart which had a dependency and the repo was updated to dependencies: - name: mysql repository: https://kubernetes-charts.storage.googleapis.com version: 1.4.0 , updated repository and it solved the problem. – Pinak Mazumdar Nov 03 '21 at 11:22
23
helm init --client-only --skip-refresh
helm repo rm stable
helm repo add stable https://charts.helm.sh/stable
user70329
  • 359
  • 2
  • 5
3

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/

2

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:~$
2

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.

Waddles
  • 197
  • 1
  • 5
1

Just for history and maybe anyone else will face also. Community answer.

Errors like "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" are typically due to problems with Proxy and non-direct connection.

This was discussed in related github issue Cannot perform helm init behind proxy, lots have same problems. As per topic - users can have such problems with some of helm versions. Its recommended to use it starting from v2.11.0

Vit
  • 7,740
  • 15
  • 40