title: kubernetes: Error from server (Forbidden): User "system:anonymous" cannot list nodes at the cluster scope even after granting permission
body: <p>Even after granting cluster roles to user, I get <code>Error from server (Forbidden): User "system:anonymous" cannot list nodes at the cluster scope. (get nodes)</code></p>
  
  <p>I have the following set for the user:</p>
  
  <pre><code>- context:
      cluster: kubernetes
      user: user@gmail.com
    name: user@kubernetes`  set in the ~/.kube/config file
  </code></pre>
  
  <p>and the below added to admin.yaml to create cluster-role and cluster-rolebindings:</p>
  
  <pre><code>kind: CluserRouster: kubernetes    user: nsp@gmail.com  name: nsp@kubernetese
  apiVersion: rbac.authorization.k8s.io/v1alpha1
  metadata:
    name: admin-role
  rules:
    - apiGroups: ["*"]
      resources: ["*"]
      verbs: ["*"]
  ---
  oidckind: ClusterRoleBinding
  apiVersion: rbac.authorization.k8s.io/v1alpha1
  metadata:
    name: admin-binding
  subjects:
    - kind: User
      name: nsp@gmail.com
  roleRef:
    kind: ClusterRole
    name: admin-role
  </code></pre>
  
  <p>When I try the command I still get error.</p>
  
  <pre><code>kubectl --username=user@gmail.com get nodes
  Error from server (Forbidden): User "system:anonymous" cannot list nodes at the cluster scope. (get nodes)
  </code></pre>
  
  <p>Can someone please suggest on how to proceed.</p>