24
votes

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?

6
Are you behind a firewall?hdhruna
yes, I am , I am using proxies also to reach outsideRahul Kumar
You probably hit this: github.com/helm/helm/issues/4326hdhruna
which helm version you use? as per github - it should work fine starting from v2.11.0Vit
For CI/CD client side helm init --stable-repo-url=https://charts.helm.sh/stable --client-onlyAdiii

6 Answers

49
votes

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.

17
votes
helm init --client-only --skip-refresh
helm repo rm stable
helm repo add stable https://charts.helm.sh/stable
1
votes

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:~$
0
votes

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

0
votes

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.