Search code examples
kubernetesk8s-rolebindingk8s-cluster-role

Are namespaces are clusterwide objects?


Can I a list all the namespaces using a role and not a clusterrole resource? If yes, can anyone help me with some example


Solution

  • Namespaces are cluster-wide objects.

    The only way to access them is if there exists a ClusterRoleBinding and a corresponding ClusterRole that gives your principal (user, service account,etc) permissions to list namespaces.