1 つの k8s ポッドで k8s API を呼び出そうとしています。ただし、次の権限の問題が発生します。
User "system:serviceaccount:default:flink" cannot list resource "nodes" in API group "" at the cluster scope.
私の yaml ファイルでは、既にRole
&を指定していますRoleBinding
。ここで何が恋しいですか?
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: flink
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: zeppelin-server-role
rules:
- apiGroups: [""]
resources: ["pods", "services", "configmaps", "deployments", "nodes"]
verbs: ["create", "get", "update", "patch", "list", "delete", "watch"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["roles", "rolebindings"]
verbs: ["bind", "create", "get", "update", "patch", "list", "delete", "watch"]
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: zeppelin-server-role-binding
namespace: default
subjects:
- kind: ServiceAccount
name: flink
roleRef:
kind: ClusterRole
name: zeppelin-server-role
apiGroup: rbac.authorization.k8s.io