2.7.3. ユーザー権限の設定
kueue-batch-user-role クラスターロールをユーザーまたはユーザーグループにバインドすることで、Red Hat build of Kueue ユーザーの権限を設定できます。
前提条件
- Red Hat build of Kueue Operator がクラスターにインストールされている。
- クラスター管理者の権限がある。
-
OpenShift CLI (
oc) がインストールされている。
手順
RoleBindingオブジェクトを YAML ファイルとして作成します。ClusterRoleBindingオブジェクトの例apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: kueue-users1 namespace: user-namespace2 subjects:3 - kind: Group name: team-a@example.com apiGroup: rbac.authorization.k8s.io roleRef:4 kind: ClusterRole name: kueue-batch-user-role apiGroup: rbac.authorization.k8s.ioRoleBindingオブジェクトを適用します。$ oc apply -f <filename>.yaml
検証
次のコマンドを実行し、出力に
kueue-batch-user-roleクラスターロールの正しい情報が含まれていることを確認し、RoleBindingオブジェクトが正しく適用されたことを確認できます。$ oc describe rolebinding.rbac出力例
... Name: kueue-users Labels: app.kubernetes.io/name=kueue Annotations: <none> Role: Kind: ClusterRole Name: kueue-batch-user-role Subjects: Kind Name Namespace ---- ---- --------- Group team-a@example.com user-namespace ...