Helm 2.9.0 安装记录

创建Helm使用的ServiceAccount,并绑定cluster-admin

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
cat > helm-rbac.yaml <<EOF
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
EOF

Helm需要依赖socat(所有节点都需要安装)

1
yum install -y socat

初始化Helm(使用国内镜像源)

1
helm init --service-account=tiller --tiller-image=daocloud.io/wb4646684/tiller:2.9.0

使用–tls系列命令导入证书出现无法访问helm server的情况,原因目前未知

Helm常用命令

1
2
3
4
helm install ${CHARTS_NAME}        #安装Charts包
helm search ${CHARTS_NAME} #搜索仓库中的Charts包
helm list #列出已安装的Charts包
helm delete ${RELEASE_NAME} #删除已安装的Chartsa包(又名Release)

清理Helm步骤

1
2
kubectl delete deploy/tiller-deploy svc/tiller-deploy -n kube-system \
&& rm -rf ~/.helm