K8S+KubeSphere之Helm安装

K8S集群部署好了,打算接着部署KubeSphere,

我忽视Helm直接安装KubeSphere不成功,搞不定

只好先装Helm了


安装Helm客户端

#下面是安装最新master版本
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash

#想要指定版本安装的话
curl https://raw.githubusercontent.com/helm/helm/release-2.16/scripts/get | bash

安装回显

Preparing to install helm and tiller into /usr/local/bin
helm installed into /usr/local/bin/helm
tiller installed into /usr/local/bin/tiller
Run 'helm init' to configure helm.

验证一下安装是否成功

helm version
Client: &version.Version{SemVer:"v2.16.9", GitCommit:"145206680c1d5c28e3fcf30d6f596f0ba84fcb47", GitTreeState:"clean"}
Error: could not find tiller

安装的版本为 2.16.9

有个报错,是因为只安装了客户端,还有服务端没装呢

先不用管,把helm 的 bash 命令补全脚本装上再说

helm completion bash > .helmrc && echo "source .helmrc" >> .bashrc
source .helmrc

现在开始装服务端,装服务端之前还要先装一下socat

yum -y install socat

去dockerhub找一个tiller的镜像,版本和Helm一样就可以,2.16.9

pull到本地就行,然后初始化

helm init --service-account tiller --tiller-image=jessestuart/tiller:v2.16.9

这里的镜像名字就是pull到本地的那个

检验tiller是否安装上

kubectl get pod -n kube-system|grep tiller
tiller-deploy-74559f6c8d-5rqjf   1/1     Running   0          61m

查看tiller的repo仓库

[root@master repository]# helm repo list
NAME  	URL                                             
stable	https://kubernetes-charts.storage.googleapis.com
local 	http://127.0.0.1:8879/charts

这一步在work节点中可能会报错

[root@node1 ~]# helm repo list
Error: Couldn't load repositories file (/root/.helm/repository/repositories.yaml).
You might need to run `helm init` (or `helm init --client-only` if tiller is already installed)

不过可以从master节点copy一份/root/.helm/repository/repositories.yaml文件,就OK

tiller删除

可能会发生安装后需要删除或者安装不成功的情况

helm reset -f
rm -rf /root/.helm

然后重新安装即可

下班,明天再次装KubeSphere!
 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值