I want to allow a ServiceAccount in namespace A to access a resource in namespace B. To achieve this I connect the ServiceAccount to a ClusterRole via a ClusterRoleBinding. The documentation says I can "use a ClusterRole to [1.] define permissions on namespaced resources and be granted within individual namespace(s)"
But looking through the K8s documentation I can't find a way how to create a ClusterRole with namespaced resources. How can I achieve this?
...how to create a ClusterRole with namespaced resources...Read further down a bit:
ClusterRolewon't help you to restraint access to a single namespaced object. You can however useRoleBindingto reference aClusterRoleand restraint access to the object in the namespace of the RoleBinding.