helm安装

执行init之前需要配置account。如果先执行的helm init,可能会报错如下:

Error: release my-release failed: User "system:serviceaccount:kube-system:default" cannot get namespaces in the namespace "default". (get namespaces default)

解决方法,执行以下命令后,创建rbac后执行init。

kubectl delete deployment tiller-deploy --namespace=kube-system 
kubectl delete service tiller-deploy --namespace=kube-system 
rm -rf ~/.helm/

helm.yaml

apiVersion: v1
kind: ServiceAccount
metadata:
  name: helm
  namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: helm
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
  - kind: ServiceAccount
    name: helm
    namespace: kube-system

执行

helm init --service-account helm

你可能感兴趣的:(helm安装)