<p>I am using <code>GitLab v12.9.1</code></p>

<p>I have created a local <code>kubernetes</code> cluster using <code>microk8</code>. </p>

<p>My <code>GitLab</code> instance is successfully configured with the <code>kubernetes</code> instance. </p>

<p>When I am installing helm using the <code>GitLab</code> then it is giving error
<a href="https://i.stack.imgur.com/xyEwj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xyEwj.png" alt="enter image description here"></a></p>

<p>I checked the <code>tiller pod</code> logs using </p>

<pre><code>kubectl -n gitlab-managed-apps logs install-helm
</code></pre>

<p>The logs output is </p>

<pre><code>+ 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-&gt;127.0.0.53:53: read: connection refused

</code></pre>

selftaught91
<p>As you can check on <a href="https://tools.keycdn.com/ping" rel="nofollow noreferrer">Ping Test</a>, <code>kubernetes-charts.storage.googleapis.com</code> is a reliable address.</p>

<p>So, cause may be either due to <a href="https://github.com/jenkins-x/jx/issues/1171" rel="nofollow noreferrer">GFW</a> or due to local connectivity issues.</p>

<h2>In case of <code>GFW</code> try a mirror</h2>

<p>For the first case WA would be to replace the charts repo URL with mirror like <a href="https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts" rel="nofollow noreferrer">https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts</a>.</p>

<h2>In local connectivity cases try repository cache</h2>

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

<p>~/.helm/repository/repositories.yaml</p>

<pre><code>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: ""
</code></pre>
