我刚刚使用运行Kubernetes 1.7.5的Google容器引擎创建了一个新的群集,并启用了新的RBAC权限.我遇到了为我的一些服务分配权限的问题,这些问题引导我进行以下操作:
使用RBAC容器引擎的文档声明必须通过运行以下命令授予用户创建授权角色的能力:
kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin [--user=<user-name>]
Run Code Online (Sandbox Code Playgroud)
但是,由于缺少权限,这会失败(我假设这些权限与我们尝试通过运行上述命令授予的权限完全相同).
Error from server (Forbidden):
User "<user-name>" cannot create clusterrolebindings.rbac.authorization.k8s.io at the cluster scope.:
"Required \"container.clusterRoleBindings.create\" permission."
(post clusterrolebindings.rbac.authorization.k8s.io)
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激,因为这阻止我创建我的集群服务所需的权限.
permissions google-cloud-platform kubernetes google-kubernetes-engine
我尝试traefik
在GKE
(google cloud kubernetes引擎)上安装为入口控制器,并且在尝试时:
kubectl apply -f https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/traefik-rbac.yaml
Run Code Online (Sandbox Code Playgroud)
我有这个错误:
来自服务器的错误(禁止):创建“ https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/traefik-rbac.yaml时出错“ :: clusterroles.rbac.authorization.k8s.io“ traefik-ingress-controller”被禁止:尝试授予额外的特权:[PolicyRule {APIGroups:[“”],资源:[“服务”],动词:[“ get “]} PolicyRule {APIGroups:[”“],资源:[” services“],动词:[” list“]} PolicyRule {APIGroups:[”“],资源:[” services“],动词:[”监视“]} PolicyRule {APIGroups:[”“],资源:[” endpoints]],动词:[“ get”]} PolicyRule {APIGroups:[“”],资源:[“ endpoints”],动词:[“列表“]} PolicyRule {APIGroups:[”“],资源:[”端点“],动词:[” watch“]} PolicyRule {APIGroups:[”“],资源:[” secrets“],动词:[” get “]} PolicyRule {APIGroups:[“”],资源:[“ secrets”],动词:[“ list”]} PolicyRule {APIGroups:[“”],资源:[“ secrets”],动词:[“ watch”]} PolicyRule {APIGroups: [“扩展名”],资源:[“入口”],动词:[“ get”]} PolicyRule {APIGroups:[“扩展名”],资源:[“入口”],动词:[“列表”]} PolicyRule { APIGroups:[“扩展名”],资源:[“ ingresses”],动词:[“ watch”]}] user=&{IzoPi4a@gmail.com [system:authenticated] map [user-assertion.cloud.google.com :[ADKE0IBz9kwSuZRZkfbLil8iC / ijcmJJmuys2DvDGxoxQ5yP6Pdq1IQs3JRwDmd / lWm2vGdMXGB4h1QKiwx + 3uV2ciTb / oQNtkthBvONnVp4fJGOSW1S + 8O8dqvoUNRLNeB5gADNn1TKEYoB + JvRkjrkTOxtIh7rPugLaP5Hp7thWft9xwZqF9U4fgYHnPjCdRgvMrDvGIK8z7ONljYuStpWdJDu7LrPpT0L]]} …
google-cloud-platform kubernetes google-kubernetes-engine traefik