GKE上的Istio安装失败,“clusterroles.rbac.authorization.k8s.io”istio-pilot“被禁止:尝试授予额外权限”

时间:2017-07-24 13:30:56

标签: google-cloud-platform kubernetes istio

尝试在GKE(Google容器引擎)上安装istio 0.1.6

运行以检查群集是否已启用RBAC(基于角色的访问控制):

$ kubectl api-versions | grep rbac
rbac.authorization.k8s.io/v1beta1

它显示'beta'版本,所以我运行:

$ kubectl apply -f istio-0.1.6/install/kubernetes/istio-rbac-beta.yaml
Error from server (Forbidden): error when creating "istio-0.1.6/install/kubernetes/istio-rbac-beta.yaml": clusterroles.rbac.authorization.k8s.io "istio-pilot" is forbidden: attempt to grant extra privileges:...

群集角色绑定创建没有帮助:

$ kubectl create clusterrolebinding myname-cluster-admin-binding --clusterrole=cluster-admin --user=myname@example.org

知道如何解决这个问题吗?

更多详情:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.2", GitCommit:"477efc3cbe6a7effca06bd1452fa356e2201e1ee", GitTreeState:"clean", BuildDate:"2017-04-19T20:33:11Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.4", GitCommit:"d6f433224538d4f9ca2f7ae19b252e6fcb66a3ae", GitTreeState:"clean", BuildDate:"2017-05-19T18:33:17Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}

2 个答案:

答案 0 :(得分:2)

CLOUDSDK_CONTAINER_USE_CLIENT_CERTIFICATE=True gcloud container clusters get-credentials...

添加CLOUDSDK_CONTAINER_USE_CLIENT_CERTIFICATE=Truegcloud container clusters get-credentials命令,该命令用适当的凭据更新kubeconfig文件以指向容器引擎群集中的kubectl,解决了这个问题:)

参考:istio issue

答案 1 :(得分:0)

我遇到过这个问题。对我来说,解决方案是--user的电子邮件地址参数必须是小写的。这意味着--user=foo.bar@example.com而非--user=Foo.Bar@example.com