<p>I am getting issues when trying to getting the information about the nodes created using AKS(Azure Connected Service) for Kubernetes after the execution of creating the clusters and getting the credentials.</p>

<p>I am using the azure-cli on ubuntu linux machine.</p>

<p>Followed the Url for creation of clusters: <a href="https://learn.microsoft.com/en-us/azure/aks/kubernetes-walkthrough" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/aks/kubernetes-walkthrough</a></p>

<p>I get the following error when using the command <code>kubectl get nodes</code>
after execution of connecting to cluster using </p>

<pre><code>az aks get-credentials --resource-group &lt;resource_group_name&gt; --name &lt;cluster_name&gt;
</code></pre>

<p>Error:</p>

<pre><code>  kubectl get nodes
</code></pre>

<blockquote>
  <p><strong>Error from server (InternalError): an error on the server ("") has prevented the request from succeeding (get nodes)</strong></p>
</blockquote>

<p>I do get the same error when i use :</p>

<pre><code>kubectl get pods -n kube-system -o=wide
</code></pre>

<p>When i connect back as another user by the following commands i.e., </p>

<pre><code>  mkdir -p $HOME/.kube

  sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config

  sudo chown $(id -u):$(id -g) $HOME/.kube/config
</code></pre>

<p>I will be able to retrieve the nodes i.e..,</p>

<pre><code> kubectl get nodes

NAME             STATUS    ROLES     AGE       VERSION

&lt;host-name&gt;   Ready     master    20m       v1.10.0



~$ kubectl get pods -n kube-system -o=wide

NAME                                   READY     STATUS    RESTARTS  AGE       
etcd-actaz-prod-nb1                      1/1       Running   0     

kube-apiserver-actaz-prod-nb1            1/1       Running   0

kube-controller-manager-actaz-prod-nb1   1/1       Running   0

kube-dns-86f4d74b45-4qshc                3/3       Running   0

kube-flannel-ds-bld76                    1/1       Running   0

kube-proxy-5s65r                         1/1       Running   0

kube-scheduler-actaz-prod-nb1            1/1       Running   0
</code></pre>

<p>But this is actually overwriting newly clustered information from file $HOME/.kube/config</p>

<p>Am i missing something when we connect to AKS-cluster get-credentials command-let that's leading me to the error </p>

<p><strong><code>*Error from server (InternalError): an error on the server ("") has prevented the request from succeeding (get nodes)*</code></strong></p>

<p>After you </p>

<h1>az aks get-credentials -n cluster-name -g resource-group</h1>

<p>If should have merged to your local configuration:</p>

<h1>/home/user-name/.kube/config</h1>

<p>Can you check your config</p>

<h1>kubectl config view</h1>

<p>And check if it is pointing to the right cluster. </p>
