title: kubectl error: You must be logged in to the server (Unauthorized)
body: <p>Today I met a strange issue about my Windows kubectl client suddenly raise authorization issue in connecting ICp.</p>
  
  <p>I was using ICP with a Widows configured kubectl.exe. Then, after a while, due to laptop automatic sleeping, my VPN connection was disconnected,  hence lose connection to remote ICP. Later I came back and re-connect the ICP. I use kubectl command again and faced:</p>
  
  <p>error: You must be logged in to the server (Unauthorized)</p>
  
  <p>On ICP master node, nothing wrong if I used:</p>
  
  <p><strong>kubectl -s 127.0.0.1:8888 -n kube-system get pods -o wide</strong></p>
  
  <p>I went back to re-configure client (pasted the code copied from admin -> configure kubectl), commands executed successful but when I issue</p>
  
  <p><strong>kubectl get pods</strong></p>
  
  <p>still error.</p>
  
  <p>I checked article:</p>
  
  <p><a href="https://stackoverflow.com/questions/45540139/kubectl-error-you-must-be-logged-in-to-the-server">kubectl - error: You must be logged in to the server</a></p>
  
  <p><a href="https://stackoverflow.com/questions/43111366/kubectl-error-you-must-be-logged-in-to-the-server-the-server-has-asked-for-th">kubectl error: &quot;You must be logged in to the server (the server has asked for the client to provide credentials)&quot;</a></p>
  
  <p><a href="https://stackoverflow.com/questions/44457609/error-you-must-be-logged-in-to-the-server-the-server-has-asked-for-the-client">error: You must be logged in to the server (the server has asked for the client to provide credentials)</a></p>
  
  <p>It looks like didn't much helpful</p>