helm下载tiller失败
谷粒商城P351
牢骚:进入到集群模块,奉劝大家要做好极大的耐心,因为总会有各种各类的问题,毕竟视频也老旧了,无数次崩溃和想放弃,但坚持下去一定能解决
执行以下命令其实就是下载tiller 并且会kubectl让子节点也下载这个tiller
helm init --service-account=tiller --tiller-image=jessestuart/tiller:v2.16.3 --history-max 300
报错如下:
[root@k8s-node1 k8s]# helm init --service-account=tiller --tiller-image=jessestuart/tiller:v2.16.3 --history-max 300
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: Failed to fetch https://kubernetes-charts.storage.googleapis.com/index.yaml : 403 Forbidden
解决方法:
touch /root/.helm/repository/repositories.yaml
helm repo add stable https://charts.helm.sh/stable
helm init --service-account=tiller --tiller-image=sapcc/tiller:v2.16.3 --history-max 300
[root@k8s-node1 k8s]# touch /root/.helm/repository/repositories.yaml
[root@k8s-node1 k8s]# helm repo add stable https://charts.helm.sh/stable
Error: repository file is out of date
[root@k8s-node1 k8s]# helm init --service-account=tiller --tiller-image=sapcc/tiller:v2.16.3 --history-max 300
Updating repository file format...
$HELM_HOME has been configured at /root/.helm.Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster.Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy.
To prevent this, run `helm init` with the --tiller-tls-verify flag.
For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation
成功
原因:
2.17.0
之前的Helm版本将不推荐使用的https://kubernetes-charts.storage.googleapis.com/index.yaml作为默认的稳定存储库,它不再解析。新的存储库是https://charts.helm.sh/stable。
参考的博客:
kubernetes之helm安装报错“https://kubernetes-charts.storage.googleapis.com“ is not a valid chart repositor_helm is not a valid chart repository-CSDN博客
如何解析https://kubernetes-charts.storage.googleapis.com“不是有效的图表存储库-腾讯云开发者社区-腾讯云
kunernets使用helm安装tiller踩坑 - 简书
以及官网:
Helm |