报错 Error: failed to download “stable/openebs“ (hint: running `helm repo update` may help)

执行 helm install --namespace openebs --name openebs stable/openebs --version 1.5.0 的时候报错

[root@k8snode1 repository]# helm install --namespace openebs --name openebs stable/openebs --version 1.5.0
Error: failed to download "stable/openebs" (hint: running `helm repo update` may help)

参考网站的文章依然报错:
参考文章1
参考文章2

[root@k8snode1 certs]# echo $(echo -n | openssl s_client -showcerts -connect kubernetes-charts.storage.googleapis.com:443 2>/dev/null  | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p') >> /etc/ssl/certs/ca-certificates.crt
[root@k8snode1 certs]# 
[root@k8snode1 certs]# 
[root@k8snode1 certs]# ls
ca-bundle.crt  ca-bundle.trust.crt  ca-certificates.crt  make-dummy-cert  Makefile  renew-dummy-cert
[root@k8snode1 certs]# helm repo add stable https://kubernetes-charts.storage.googleapis.com
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: lookup kubernetes-charts.storage.googleapis.com on 192.168.249.39:53: read udp 10.0.2.9:48308->192.168.249.39:53: i/o timeout

参考另一篇文章,有进展
参考文章
按照这篇文章执行,我报错如下:

[root@k8snode1 certs]# helm repo add stable https://charts.helm.sh/stable
Error: Looks like "https://charts.helm.sh/stable" is not a valid chart repository or cannot be reached: Get https://charts.helm.sh/stable/index.yaml: dial tcp: lookup charts.helm.sh on 192.168.249.39:53: read udp 10.0.2.9:60669->192.168.249.39:53: i/o timeout
[root@k8snode1 certs]# ping charts.helm.sh
ping: charts.helm.sh: Name or service not known

很显然,是我连不通这个网址。于是,我参考我之前写的那篇文章,找到一个域名解析网站, 找到对应 ip , 再编辑 /etc/hosts 文件,将 ip 和 域名 的映射加到末尾。
在这里插入图片描述
在这里插入图片描述
再次 ping 该 域名 是可以 ping 通的。

[root@k8snode1 certs]# ping 185.199.110.153
PING 185.199.110.153 (185.199.110.153) 56(84) bytes of data.
64 bytes from 185.199.110.153: icmp_seq=1 ttl=49 time=323 ms
^C
[root@k8snode1 certs]# ping charts.helm.sh
PING charts.helm.sh (185.199.110.153) 56(84) bytes of data.
64 bytes from charts.helm.sh (185.199.110.153): icmp_seq=2 ttl=49 time=676 ms
64 bytes from charts.helm.sh (185.199.110.153): icmp_seq=5 ttl=49 time=216 ms
^C
--- charts.helm.sh ping statistics ---


然后再次按照该文章执行:

[root@k8snode1 certs]# helm repo add stable https://charts.helm.sh/stable
"stable" has been added to your repositories
[root@k8snode1 certs]# helm repo list
NAME  	URL                          
stable	https://charts.helm.sh/stable
[root@k8snode1 certs]# helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "stable" chart repository
Update Complete.
[root@k8snode1 certs]# helm search
在列出的结果中,可以找到 
stable/openebs                       	1.11.1       	1.11.0                 	DEPRECATED Containerized Storage for Containers

于是再次执行最开始的命令,可以成功。

[root@k8snode1 certs]# helm install --namespace openebs --name openebs stable/openebs --version 1.5.0
NAME:   openebs
LAST DEPLOYED: Thu Mar 14 16:04:17 2024
NAMESPACE: openebs
STATUS: DEPLOYED


更新

不需要像我上面那样编辑 /etc/hosts 文件去配置 ip 和 域名 的映射。
直接修改 /etc/sysconfig/network-scripts/ifcfg-eth0 文件,添加 google 和 百度 的DNS服务器。参考这篇文章
在这里插入图片描述

  • 9
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值