<p>I have a KUBE_CONFIG file that I'm using to access a Kubernetes cluster. I can only list pods. I can't list nodes or any other resource. </p>

<p>I have followed <a href="https://stackoverflow.com/questions/54656963/forbidden-user-cannot-get-path-not-anonymous-user">Forbidden: user cannot get path &quot;/&quot; (not anonymous user)</a>, but not successful.</p>

<p>I tried creating a role but I get the following error:</p>

<pre><code>Error from server (Forbidden): clusterroles.rbac.authorization.k8s.io is forbidden: User "user2" cannot create resource "clusterroles" in API group "rbac.authorization.k8s.io" at the cluster scope
</code></pre>

<p>Some of other errors are:</p>

<p>When I, <code>kubectl get nodes</code></p>

<pre><code>Error from server (Forbidden): nodes is forbidden: User "user2" cannot list resource "nodes" in API group "" at the cluster scope
</code></pre>

<p>When I access Kubernetes dashboard on the browser, I get:</p>

<pre><code>Forbidden: user cannot get path “/” 
</code></pre>

<p>My expectation is to be able to create cluster roles so that I can access resources.</p>

learner
<p>It has been already stated. But I feel like this requires explanation and some additional information on what is going on. </p>

<p>Usually the kube-config file is located in a hidden folder in home directory named <code>~/.kube</code> you can also call it from any directory using:</p>

<p><code>kubectl --kubeconfig="kubeconfigname.yaml" get pods</code></p>

<p>In your case you certainly have no privileges to do that as your error directly states that (this one is about creating clusterroles):</p>

<pre><code>Error from server (Forbidden): clusterroles.rbac.authorization.k8s.io is forbidden: User "user2" cannot create resource "clusterroles" in API group "rbac.authorization.k8s.io" at the cluster scope
</code></pre>

<p><code>User "user2" cannot create resource</code> so cluster admin created a user2 but he did not provide the necessary (cluster)roles for you, the same reason is behind the creation of those rules. If you want to create roles, list nodes, edit objects you need to request that (cluster)roles from the administrator of the cluster. Here is a quick <a href="https://itnext.io/let-you-team-members-use-kubernetes-bf2ebd0be717" rel="nofollow noreferrer">guide</a> on how to do it, as you won't be able to do it by yourself you can share it with the admin in case if the mistake was due to lack of knowledge. Other useful links:</p>

<p><a href="https://docs.bitnami.com/kubernetes/how-to/configure-rbac-in-your-kubernetes-cluster/#use-case-1-create-user-with-limited-namespace-access" rel="nofollow noreferrer">Create User With Limited Namespace Access</a></p>

<p><a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding" rel="nofollow noreferrer">RoleBinding and ClusterRoleBinding</a></p>
