簡體   English   中英

Gitlab 使用 helm 安裝分櫱導致 kubernetes-charts.storage.googleapis.com 不是有效的圖表存儲庫

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

我正在使用GitLab v12.9.1

我使用microk8創建了一個本地kubernetes集群。

我的GitLab實例成功配置了kubernetes實例。

當我使用GitLab安裝 helm 時,它會給出錯誤在此處輸入圖像描述

我檢查了tiller pod日志使用

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

日志 output 是

+ 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

正如您可以在Ping Test上查看的那樣, kubernetes-charts.storage.googleapis.com是一個可靠的地址。

因此,原因可能是由於GFW或本地連接問題。

如果是GFW ,請嘗試鏡像

對於第一種情況,WA 將用https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts 之類的鏡像替換圖表倉庫 URL

在本地連接情況下嘗試存儲庫緩存

對於第二種情況,您可以嘗試使用本地緩存,即:

~/.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: ""

這很可能是因為防火牆。
你可以通過指定你的 stable-repo-url 來解決這個問題:

helm init --service-account tiller --history-max 100 --wait --stable-repo-url=<your url, such as https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM