1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| [root@master nexus] apiVersion: v1 kind: ServiceAccount metadata: name: nfs-client namespace: nexus --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: nfs-client-runner namespace: nexus rules: - apiGroups: [""] resources: ["persistentvolumes"] verbs: ["get","list","watch","create","delete"] - apiGroups: [""] resources: ["persistentvolumeclaims"] verbs: ["get","list","watch","create","delete"] - apiGroups: ["storage.k8s.io"] resources: ["storageclasses"] verbs: ["get","list","watch"] - apiGroups: [""] resources: ["events"] verbs: ["get","list","watch","create","update","patch"] - apiGroups: [""] resources: ["endpoints"] verbs: ["create","delete","get","list","watch","patch","update"] --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: run-nfs-provisioner namespace: nexus subjects: - kind: ServiceAccount name: nfs-client namespace: nexus roleRef: kind: ClusterRole name: nfs-client-runner apiGroup: rbac.authorization.k8s.io
[root@master nexus]
|