title: AKS using Kubernetes : not able to connect to cluster nodes once logged in to the cluster through azure-cli on Ubuntu
body: <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://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough" rel="nofollow noreferrer">https://docs.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>