Gitlab installing tiller using helm is giving kubernetes-charts.storage.googleapis.com not a valid chart repository

4/17/2020

I am using GitLab v12.9.1

I have created a local kubernetes cluster using microk8.

My GitLab instance is successfully configured with the kubernetes instance.

When I am installing helm using the GitLab then it is giving error enter image description here

I checked the tiller pod logs using

kubectl -n gitlab-managed-apps logs install-helm

The logs output is

+ helm init --tiller-tls --tiller-tls-verify --tls-ca-cert /data/helm/helm/config/ca.pem --tiller-tls-cert /data/helm/helm/config/cert.pem --tiller-tls-key /data/helm/helm/config/key.pem --service-account tiller
Creating /root/.helm 
Creating /root/.helm/repository 
Creating /root/.helm/repository/cache 
Creating /root/.helm/repository/local 
Creating /root/.helm/plugins 
Creating /root/.helm/starters 
Creating /root/.helm/cache/archive 
Creating /root/.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: lookup kubernetes-charts.storage.googleapis.com on 127.0.0.53:53: read udp 127.0.0.1:60799->127.0.0.53:53: read: connection refused
-- selftaught91
docker
gitlab
kubernetes
kubernetes-helm
ssl

1 Answer

4/19/2020

As you can check on Ping Test, kubernetes-charts.storage.googleapis.com is a reliable address.

So, cause may be either due to GFW or due to local connectivity issues.

In case of GFW try a mirror

For the first case WA would be to replace the charts repo URL with mirror like https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts.

In local connectivity cases try repository cache

For the second case you may try to use local cache, i.e.:

~/.helm/repository/repositories.yaml

apiVersion: v1
repositories:
- caFile: ""
  cache: ~/.helm/repository/cache/stable-index.yaml
  certFile: ""
  keyFile: ""
  name: stable
  password: ""
  url: https://kubernetes-charts.storage.googleapis.com
  username: ""
- caFile: ""
  cache: ~/.helm/repository/cache/local-index.yaml
  certFile: ""
  keyFile: ""
  name: local
  password: ""
  url: http://127.0.0.1:8879/charts
  username: ""
-- Yasen
Source: StackOverflow