【发布时间】:2021-03-10 10:00:14
【问题描述】:
我有一个可以访问应用程序命名空间之一的服务帐户。我创建了一个集群角色和角色绑定,并将其映射到该命名空间中的关联服务帐户。 除了在集群级别上列出/创建 PV 之外,一切都按预期工作。有人可以帮忙吗。
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: dxf-clusterrole
rules:
-
apiGroups:
- ""
- apps
- batch
- extensions
- policy
- rbac.authorization.k8s.io
- roles.rbac.authorization.k8s.io
- authorization.k8s.io
resources:
- secrets
- configmaps
- deployments
- endpoints
- horizontalpodautoscalers
- jobs
- limitranges
- namespaces
- nodes
- pods
- persistentvolumes
- persistentvolumeclaims
- resourcequotas
- replicasets
- replicationcontrollers
- serviceaccounts
- services
- role
- rolebindings
verbs:
- get
- watch
- list
- create
- delete
- nonResourceURLs: ["*"]
verbs:
- get
- watch
- list
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
creationTimestamp: null
name: dxf-clusterrolebinding
namespace: dxf-uat
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: dxf-clusterrole
subjects:
- kind: ServiceAccount
name: dxf-deployer
namespace: dxf-uat
用户“system:serviceaccount:dxf-uat:dxf-deployer”无法在集群范围内的 API 组“”中获取资源“persistentvolumes”
【问题讨论】:
标签: kubernetes rbac