helm介绍

helm的作用: Kubernetes一个包管理引擎

tiller的作用:功能和软件仓库一样,类似于/etc/yum.repos.d目录下的xxx.repo。

安装helm的目的是为了后面安装kube-batch

环境说明

环境:4台ubuntu16.04 1个master 3个node

k8s版本:V1.13.2

helm版本:v2.13.0

安装过程

官网下载二进制文件

官网地址: https://github.com/helm/helm/releases

我下载的是helm-v2.13.0-linux-amd64.tar.gz

解压helm,然后移动helm文件到/usr/local/bin目录下

1
mv linux-amd64/helm /usr/local/bin/  

添加执行权限

1
chmod +x /usr/local/bin/helm

验证版本

helm version

安装Helm的服务端tiller

给tiller创建权限

1
2
kubectl create serviceaccount --namespace kube-system tiller  
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller  

安装tiller

helm init -i jessestuart/tiller:v2.13.0

为应用程序设置serviceaccount:

1
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}' 

验证是否安装成功

1
helm repo list