helm(一)

一:
1、下载helm-v2.10.0-linux-amd64.tar.gz 地址:https://github.com/kubernetes/helm/releases
2,解压缩 tar -zxvf helm-v2.10.0-linux-amd64.tar.gz

3,mv linux-amd64/helm /usr/local/bin/helm

4,helm version

5,目前只能查看到客户端的版本,服务器还没有安装。
helm 有很多子命令和参数,为了提高使用命令行的效率,通常建议安装 helm 的 bash 命令补全脚本,方法如下:
helm completion bash > .helmrc
echo “source .helmrc” >> .bashrc
source .bashrc

二、安装tiller服务端 (不能科学上网,使用国内镜像)
1、docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.10.0

2、 权限配置不然会报这种错 no release found
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
kubectl patch deploy --namespace kube-system tiller-deploy -p ‘{“spec”:{“template”:{“spec”:{“serviceAccount”:“tiller”}}}}’ (此项高版本或许不起效)

3、 helm init -i registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.10.0 (我使用的)

helm init --service-account tiller --upgrade -i registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.10.0 --skip-refresh

helm init常用配置项如下:
–canary-image:安装金丝雀build
–tiller-image:安装指定image
–kube-context:安装到指定的kubernetes集群
–tiller-namespace:安装到指定的namespace中
–upgrade:如果tiller server已经被安装了,可以使用此选项更新镜像
–service-account:用于指定运行tiller server的serviceaccount,该account需要事先在kubernetes集群中创建,且需要相应的rbac授权

4,helm version
Client: &version.Version{SemVer:“v2.10.0”, GitCommit:“9ad53aac42165a5fadc6c87be0dea6b115f93090”, GitTreeState:“clean”}
Server: &version.Version{SemVer:“v2.10.0”, GitCommit:“9ad53aac42165a5fadc6c87be0dea6b115f93090”, GitTreeState:“clean”}

5、查看tiller的Service
[_] linux02 ~# kubectl get services -n kube-system
tiller-deploy ClusterIP 10.103.12.239 44134/TCP 15m

查看tiller的Deployment
[_] linux02 ~# kubectl get deployment -n kube-system
tiller-deploy 1 1 1 1 16m

查看tiller的Pod

[_] linux02 ~# kubectl get pods -n kube-system
tiller-deploy-56dd949bd5-t7kq5 1/1 Running 0 16m

个人github地址:https://github.com/luoyan321 感兴趣的同学可以去提提意见

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值