diff --git a/docs/docs/online/rbac.html b/docs/docs/online/rbac.html index 9b972f8..d8325cb 100644 --- a/docs/docs/online/rbac.html +++ b/docs/docs/online/rbac.html @@ -218,6 +218,48 @@

Roles

no +
+

Creating a Role with the Minimum Permissions

+
+

The following creates a role with the minimum permissions required for connecting and +viewing existing pods. Once created, a user can be bound to it with a +role-binding.

+
+
+
+
$ cat <<EOF | kubectl create -f -
+apiVersion: rbac.authorization.k8s.io/v1
+kind: Role
+metadata:
+  name: hawtio-viewer
+rules:
+- apiGroups:
+  - ""
+  resources:
+  - pods
+  verbs:
+  - get
+  - list
+  - watch
+- apiGroups:
+  - ""
+  resources:
+  - pods/proxy
+  verbs:
+  - get
+  - list
+  - watch
+  - create
+- apiGroups:
+  - authorization.k8s.io
+  resources:
+  - localsubjectaccessreviews
+  verbs:
+  - create
+EOF
+
+
+