<p>I added a new user named &quot;hello&quot; to kind cluster with client-certificate-data and client-key-data. When I switch to its context and press the command:</p>
<p><code>kubectl get ns development-hello</code></p>
<p>I get:</p>
<p><code>Error from server (Forbidden): namespaces &quot;development-hello&quot; is forbidden: User &quot;hello&quot; cannot get resource &quot;namespaces&quot; in API group &quot;&quot; in the namespace &quot;development-hello&quot;</code></p>
<p>I do not have clusterrolebinding for this user.</p>
<p>Here is a snapshot from kubectl config view</p>
<pre><code>apiVersion: v1   
clusters:
- cluster:
    certificate-authority-data: DATA+OMITTED
    server: https://127.0.0.1:33445
  name: kind-kind
contexts:
- context:
    cluster: kind-kind
    user: hello
  name: hello-kind-kind
- context:
    cluster: kind-kind
    user: kind-kind
  name: kind-kind
current-context: hello-kind-kind
kind: Config
preferences: {}
users:
- name: hello
  user:
    client-certificate-data: REDACTED
    client-key-data: REDACTED
- name: kind-kind
  user:
    client-certificate-data: REDACTED
    client-key-data: REDACTED
</code></pre>

<p>A ClusterRole and RoleBinding need to be created for the <code>hello</code> user by using the <code>admin</code> account.</p>
<pre><code>apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: ns-role
rules:
- apiGroups: [&quot;&quot;]
  resources: [&quot;namespace&quot;]
  verbs: [&quot;get&quot;, &quot;watch&quot;, &quot;list&quot;, &quot;create&quot;, &quot;delete&quot;]    
---    
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: ns-rolebinding
  namespace: development-hello
subjects:
- kind: User
  name: hello
  apiGroup: rbac.authorization.k8s.io
roleRef:
  kind: ClusterRole
  name: ns-role
  apiGroup: rbac.authorization.k8s.io
</code></pre>
<p>The kubeconfig file with admin account can be retrieved using below command</p>
<pre><code>docker exec -it &lt;kind-control-plane-node-name&gt;

sudo cat /etc/kubernetes/admin.conf
</code></pre>
