$ 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+