我刚刚在 Google Cloud 平台上创建了一个 GKE 集群。我已经安装在云控制台中helm:
$ helm version
version.BuildInfo{Version:"v3.0.0", GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}
Run Code Online (Sandbox Code Playgroud)
我也创造了必要的serviceaccount和clusterrolebinding对象:
$ cat helm-rbac.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: tiller
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: tiller
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: tiller
namespace: kube-system
$ kubectl apply -f helm-rbac.yaml
serviceaccount/tiller created
clusterrolebinding.rbac.authorization.k8s.io/tiller created
Run Code Online (Sandbox Code Playgroud)
但是尝试初始化tiller给了我以下错误:
$ helm init --service-account tiller --history-max 300
Error: unknown flag: --service-account
Run Code Online (Sandbox Code Playgroud)
这是为什么?
google-cloud-platform kubernetes google-kubernetes-engine kubernetes-helm