gpt4 book ai didi

Kubernetes 无法在集群范围内创建命名空间

转载 作者:行者123 更新时间:2023-12-02 11:35:44 26 4
gpt4 key购买 nike

我试图使用 kubectl 创建一个命名空间,但我收到了这个错误:

Error from server (Forbidden): error when creating "namespacefoo": namespaces is forbidden: User "xyz@pqr.com" cannot create namespaces at the cluster scope



Kubernetes 中有“范围”的概念吗?我找不到有关不同类型范围的任何信息。如果我无法在集群范围内创建命名空间,我可以在哪里创建命名空间?如何检查我可以访问哪些“范围”?

最佳答案

这取决于您的 Kubernetes 环境。
answer suggest (在 Google Cloud environment 中):

That suggests that gcloud config set container/use_client_certificate is set to true i.e. that gcloud is expecting a client cluster certificate to authenticate to the cluster (this is what the 'client' in the error message refers to).

Unsetting container/use_client_certificate by issuing the following command in the glcoud config ends the need for a legacy certificate or credentials and prevents the error message:

gcloud config unset container/use_client_certificate

Issues such as this may be more likely if you are using an older version of gcloud on your home workstation or elsewhere.


仍然, kubernetes/kubernetes issue 62361提到了相同的错误消息。

关于Kubernetes 无法在集群范围内创建命名空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51915228/

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