Jx: Error: Looks like "https://kubernetes-charts.storage.googleapis.com" is not a valid chart repository or cannot be reached pipline error: exit status 1

Created on 29 Jun 2018  ·  16Comments  ·  Source: jenkins-x/jx

when running maven pod
jenkins display
Error: 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.160.112:443: i/o timeout

i guess init helm with skip-refresh like "helm init --client-only --skip-refresh".

Most helpful comment

@lklkxcxc @Venusbee Grazie per aver condiviso la vostra soluzione con tutti noi.

I opened a bug in helm to provide a stable mirror for that site (accessible from China), please vote for it. https://github.com/helm/helm/issues/4351 .

I wouldn't consider this a jx bug. In the best case we should just document the workarounds.

All 16 comments

@Venusbee not sure why you cannot access https://kubernetes-charts.storage.googleapis.com though - it should be pretty reliable. Does this fail all the time - or was it a one off? I wonder are you behind a http proxy or something?

because of GFW(Great Firewall of china) 。lost connection cause pipline error is inconvenient . may helm init pipline can modified?

@jstrachan

@Venusbee
Hi, Venusbee.
这个问题可以通过手动更换stable存储库为阿里云的存储库来解决。

helm repo remove stable
helm repo add stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
helm repo update

@jstrachan i want to modify chartmuseum url of jx how to. thanks

我也遇到了,手动更换stable不行

@lklkxcxc 修改默认chart源地址 然后重新编译下jx ,chart仓库名称不要变动,后面依赖很多。主要就是 新建chart仓库,新建docker镜像仓库。然后同步仓库。

@lklkxcxc @Venusbee Grazie per aver condiviso la vostra soluzione con tutti noi.

I opened a bug in helm to provide a stable mirror for that site (accessible from China), please vote for it. https://github.com/helm/helm/issues/4351 .

I wouldn't consider this a jx bug. In the best case we should just document the workarounds.

There're many occasions that helm requires access to https://kubernetes-charts.storage.googleapis.com, not merely locally.

From what I observed, the script in a project's Jenkinsfile would run jx step helm release which result to helm init --upgrade --wait --force-upgrade on remote builder container in the cluster.

I wonder if we could pass an option like jx step helm release --stable-repo-url <string> so helm could know which stable repo to use?

这个问题可以通过手动更换stable存储库为阿里云的存储库来解决。

@gcontini , @nnt, @Mr-Linus - are your downvotes because the answer was in Chinese or because the solution is no good/unstable?

The solution @livelyRyan proposed is not good because the Repository about https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts is too old and it updates so slow that I can't find the latest deployment sample I want. @AntonOfTheWoods

I got the same problem. Any updates?

  1. The original issue is that the access to https://kubernetes-charts.storage.googleapis.com is blocked and the pipeline cannot continue. To address this, I suggest using an alternative charts repo such as https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts (not only in local but also in Jenkinsfile), this workaround works well in my clusters.

  2. If we cannot bear an outdated mirror repo, then the best choice is to setup a private repo server that hosts index.yaml and all charts .tgz files synchronized from google's official repo, and then replace all base urls in index.yaml with your private repo address.

@beebird Thanks for your kind reply.

jx install command always reset my tiller. I have to pass a --no-tiller param to reuse my pre-configured one . But my pods still failed with connecting https://kubernetes-charts.storage.googleapis.com.

Would you mind sharing how you set you local helm and Jenkinsfile?

jx install --provider=kubernetes --on-premise \
--no-tiller

Update tiller to aliyuncs repo:

helm init --upgrade -i \
registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.12.0 \
--stable-repo-url \
https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts

Hi @NiuZhuang , I didn't add --no-tiller flag during installation, here is some key steps of what I did:

  1. pull tiller image on k8s nodes (through my own docker registry that contains some mirror images from gcr.io) and re-tag it to gcr.io/kubernetes-helm/tiller:<version number> (you can check the failure log to get the desired version number)
  2. on local machine:
# install helm stable mirror
helm repo add stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
  1. in Jenkinsfiles of you environment repo / project repo:
# before jx step helm release, configure helm manually so the process can pass
 sh 'helm init --client-only --stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts'

// release the helm chart
sh 'jx step helm release'
  1. You may also get stuck when adding jenkins-x repo, my workaround is to deploy a mirror and setup the repo right after the script in step 3

Closing this since it seems to be caused by the GFW not by the charts repository availability.

The workaround for now is to replace the charts repo URL with https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts.

Was this page helpful?
0 / 5 - 0 ratings