gpt4 book ai didi

kubernetes - 来自服务器的错误(禁止): error when creating .。 : clusterroles. rbac.authorization.k8s.io ...:尝试授予额外权限:

转载 作者:行者123 更新时间:2023-12-02 22:50:20 25 4
gpt4 key购买 nike

创建集群角色失败。 <> 已分配为“容器引擎管理员”和“容器引擎集群管理员”角色

Error from server (Forbidden): error when creating "prometheus-
operator/prometheus-operator-cluster-role.yaml":
clusterroles.rbac.authorization.k8s.io "prometheus-operator"
is forbidden: attempt to grant extra privileges: [{[create]
[extensions] [thirdpartyresources] [] []} {[*]
[monitoring.coreos.com] [alertmanagers] [] []} {[*]
[monitoring.coreos.com] [prometheuses] [] []} {[*]
[monitoring.coreos.com] [servicemonitors] [] []} {[*]
[apps] [statefulsets] [] []} {[*] [] [configmaps] [] []}
{[*] [] [secrets] [] []} {[list] [] [pods] [] []} {[delete]
[] [pods] [] []} {[get] [] [services] [] []} {[create]
[] [services] [] []} {[update] [] [services] [] []} {[get]
[] [endpoints] [] []} {[create] [] [endpoints] [] []}
{[update] [] [endpoints] [] []} {[list] [] [nodes]
[] []} {[watch] [] [nodes] [] []}]
user=&{<<my_account>>@gmail.com
[system:authenticated] map[]} ownerrules=[{[create]
[authorization.k8s.io] [selfsubjectaccessreviews]
[] []} {[get] [] [] [] [/api /api/* /apis /apis/*
/healthz /swaggerapi /swaggerapi/* /version]}]
ruleResolutionErrors=[]

最佳答案

我在 Google Kubernetes Engine 上遇到了同样的问题。

根据enj的回答和ccyang2005的评论,请找到以下解决我问题的snipet:)

第 1 步:获取您的身份

gcloud info | grep Account

将向您输出类似帐户:[myname@example.org]

第 2 步:将 cluster-admin 授予您当前的身份

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

将输出类似 Clusterrolebinding "myname-cluster-admin-binding"创建的内容

<小时/>

之后,您将能够创建 CusterRoles

关于kubernetes - 来自服务器的错误(禁止): error when creating .。 : clusterroles. rbac.authorization.k8s.io ...:尝试授予额外权限:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44349987/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com