<p>When I am using <code>kubectl get namespace</code> command in my Kubernetes master node, I am getting proper output. And also I configured kubectl in my local machine. When I am running the same command from local machine configured with kubectl, I am getting error like the following,</p>

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

<p>I copied the configuration file kubelet.conf from cluster and copied into .kube/config. And also installed the kubectl. This is the process what did till now.</p>

<p>Result of kubectl config view is like the following,</p>

<p><a href="https://i.stack.imgur.com/nAZO2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nAZO2.png" alt="enter image description here"></a></p>

<p>How can I resolve this issue?</p>

Mr.DevEng
<p>Kubespray by default saves cluster admin kubeconfig file as inventory/mycluster/artifacts/admin.conf. Read more here: <a href="https://github.com/kubernetes-sigs/kubespray/blob/master/docs/getting-started.md#accessing-kubernetes-api" rel="nofollow noreferrer">https://github.com/kubernetes-sigs/kubespray/blob/master/docs/getting-started.md#accessing-kubernetes-api</a> </p>
