尝试连接到群集端点时的错误消息 [英] Error message when trying to connect to cluster endpoint

查看:601
本文介绍了尝试连接到群集端点时的错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试连接到我的Kubernetes群集端点IP时,收到此消息.有人知道这是从哪里来的吗?可能是这里的问题?

When I try to connect to my Kubernetes cluster endpoint IP, I get this message. Does anybody knows where this comes from and would could be the problem here?

{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {

  },
  "status": "Failure",
  "message": "forbidden: User \"system:anonymous\" cannot get path \"/\": No policy matched.",
  "reason": "Forbidden",
  "details": {

  },
  "code": 403
}

推荐答案

您没有提供许多有关要实现的目标的信息.但是正如Konstantin已经提到的那样,只有当您尝试以未授权(匿名)用户身份访问API时,此错误才可见. 您可能已尝试以匿名用户的身份curl API服务器.

You did not provide to many information on what you want to achieve. But as Konstantin already mentioned, this error is visible only when you try to access the API as unauthorized (anonymous) user. You have probably tried to curl the API server as an anonymous user.

在这个很棒的

要与Kubernetes API进行交互,您需要一个带有以下内容的ServiceAccount 通过(Cluster)Role和 角色绑定.使用ServiceAccount的令牌进行身份验证.自从 所有通信均通过TLS,您还需要自签名 证书.或者,允许不安全的连接,但这是 不推荐.

To interact with the Kubernetes API you need a ServiceAccount with the correct permissions, obtained through a (Cluster)Role and a RoleBinding. Authenticate by using the ServiceAccount’s token. Since all communication is over TLS you also need the self-signed certificate. Alternatively, allow insecure connections, but this is not recommended.

有关Kubernetes API及其访问方式的更多信息

More about Kubernetes API and how to access it here.

这篇关于尝试连接到群集端点时的错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆