在官網下載指定想要版本的helm并傳入服務器:https://github.com/helm/helm/releases
tar zxvf helm-xxxxx-linux-amd64.tar.gz
mv liniux-amd64/helm /usr/local/bin
helm version #查看helm client版本
創(chuàng)建rbac-config.yaml婶肩,并輸入以下內容:
apiVersion: v1
kind: ServiceAccount
metadata:
name: tiller
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: tiller
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: tiller
namespace: kube-system
然后執(zhí)行kubectl create -f rbac-config.yaml
以上步驟配置成功后穷当,安裝tiller挖滤。(和helm client對應的版本一樣)
# google源
helm init --service-account tiller --upgrade -i gcr.io/kubernetes-helm/tiller:v2.11.0
# 阿里源
helm init --service-account tiller --upgrade -i registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.11.0 --stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
參數--stable-repo-url
用于拉取charts所在源的位置,如果不設置則默認訪問官方charts
查看tiller是否安裝成功
[root@k8s-master01 helm]# kubectl get pod -n kube-system -l app=helm
NAME READY STATUS RESTARTS AGE
tiller-deploy-66cdf6dfc8-p7x7g 1/1 Running 0 20d
添加其他charts可使用helm repo add <name> <url>
常用命令:
helm list --all #列出所有部署應用
helm repo list #列出repo
helm delete --purge <name> #刪除某個應用
helm reset #重置helm