helm init 'target machine actively refuses' error

8/4/2019

I'm trying to start using helm and when I type helm init it shows me the following error:

Creating C:\Users\username\.helm\repository\repositories.yaml
Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com
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 74.125.193.128:443: connectex: No connection could be made because the target machine actively refused it.

Tried pinging to 74.125.193.128:443 as well and it won't work too. I thought it was a proxy issue but it's not it so I tried looking online for similar issues and haven't encountered any with the same error.

-- teamdever
kubernetes
kubernetes-helm

1 Answer

8/5/2019

What eventually was the problem is that a repositories.yaml file didn't exist in the .helm/repository folder. It worked when I created the file with the following content:

apiVersion: v1
repositories:
  - name: charts
    url: "https://kubernetes-charts.storage.googleapis.com"
  - name: local
    url: "http://localhost:8879/charts"

Then I could do helm init with no problem.

-- teamdever
Source: StackOverflow