我们正在库伯奈特建立一个舰队服务器。它被赋予了一个CA,并声明了它的运行状态,但是我们不能将它放入其中,而日志只是以下内容:
E0817 09:12:10.074969 927 leaderelection.go:330]错误检索资源锁默认/弹性代理集群领导: leases.coordination.k8s.io“弹性代理-集群领导”是禁止的:用户“系统:服务帐户:默认:弹性代理”无法在API组"coordination.k8s.io“中获取名称空间”默认“中的资源”租约“。
我几乎找不到这方面的信息,更不用说决议了。任何指向可能的解决方案的信息都会极大地帮助您!
发布于 2022-08-17 09:37:36
您需要确保已经从安装文件中应用了ServiceAccount、ClusterRoles和ClusterRoleBindings。
在快速启动文档中可以找到其中的一个例子。
https://www.elastic.co/guide/en/cloud-on-k8s/2.2/k8s-elastic-agent-fleet-quickstart.html
服务帐户
kind: ServiceAccount
metadata:
name: elastic-agent
namespace: default集群作用
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: elastic-agent
rules:
- apiGroups: [""] # "" indicates the core API group
resources:
- pods
- nodes
- namespaces
verbs:
- get
- watch
- list
- apiGroups: ["coordination.k8s.io"]
resources:
- leases
verbs:
- get
- create
- update簇角色绑定
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: elastic-agent
subjects:
- kind: ServiceAccount
name: elastic-agent
namespace: default
roleRef:
kind: ClusterRole
name: elastic-agent
apiGroup: rbac.authorization.k8s.iohttps://stackoverflow.com/questions/73385850
复制相似问题