<p>I am using k9s tool for managing kubernetes cluster(GKE on Google Cloud Platform).</p>
<p>Recently k9s has stopped working and stopped connecting to k8s cluster.</p>
<p>When I launch k9s(i.e. <code>k9s -n default</code>) it shows me all clusters's context and when I click on one of the contexts then</p>
<p>Error is</p>
<pre><code>Unable to connect to context &quot;XXXXXXXXXX&quot;
</code></pre>
<p>it shows me below error as displayed in screenshot.</p>
<p><a href="https://i.stack.imgur.com/0zNdg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0zNdg.jpg" alt="enter image description here" /></a></p>
<p>However with <code>kubectl</code> client, it is working fine and showing all the data of cluster.</p>
<p>I tried reinstalling k9s and update its version but problem persists.</p>
<p>How can I debug the issue and fix the problem ?</p>

<p>After investigating, checked logs, you can get logs location by running</p>
<pre class="lang-bash prettyprint-override"><code>$ k9s info     

 ____  __.________       

|    |/ _/   __   \______

|      &lt; \____    /  ___/

|    |  \   /    /\___ \ 

|____|__ \ /____//____  &gt;

        \/            \/ 

  

Configuration:   /Users/xyx/Library/Applications/k9s/config.yml

Logs:            /var/folders/8r/t5bx6ckdchjdacj3nz7qyq0b4ys7mwh0000gp/T/k9s-shubcbsj.log

Screen Dumps:    /var/folders/8r/t5bx6ckdchjdacj3nz7qyq0b4ys7mwh0000gp/T/k9s-screens-chakhcahkcha
</code></pre>
<p>Logs showed me this errors.</p>
<pre class="lang-bash prettyprint-override"><code>9:08PM ERR Unable to connect to api server error=&quot;The gcp auth plugin has been removed.\nPlease use the \&quot;gke-gcloud-auth-plugin\&quot; kubectl/client-go credential plugin instead.\nSee https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke for further details&quot;
9:08PM ERR ClusterUpdater failed error=&quot;Conn check failed (1/5)&quot;
9:08PM ERR Unable to connect to api server error=&quot;The gcp auth plugin has been removed.\nPlease use the \&quot;gke-gcloud-auth-plugin\&quot; kubectl/client-go credential plugin instead.\nSee https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke for further details&quot;
9:08PM ERR ClusterUpdater failed error=&quot;Conn check failed (2/5)&quot;
9:08PM ERR Unable to connect to api server error=&quot;The gcp auth plugin has been removed.\nPlease use the \&quot;gke-gcloud-auth-plugin\&quot; kubectl/client-go credential plugin instead.\nSee https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke for further details&quot;
9:08PM ERR ClusterUpdater failed error=&quot;Conn check failed (3/5)&quot;
9:08PM ERR Unable to connect to api server error=&quot;The gcp auth plugin has been removed.\nPlease use the \&quot;gke-gcloud-auth-plugin\&quot; kubectl/client-go credential plugin instead.\nSee https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke for further details&quot;
9:08PM ERR ClusterUpdater failed error=&quot;Conn check failed (4/5)&quot;
9:08PM ERR Unable to connect to api server error=&quot;The gcp auth plugin has been removed.\nPlease use the \&quot;gke-gcloud-auth-plugin\&quot; kubectl/client-go credential plugin instead.\nSee https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke for further details&quot;
9:08PM ERR Conn check failed (5/5). Bailing out!
</code></pre>
<p>I realized it is because of my kubectl client was recently updated and k9s stopped connecting to k8s because of that.</p>
<p>Followed the link as there has been some changes in kubectl authentication for gke in newer kubectl versions.</p>
<p><a href="https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke" rel="nofollow noreferrer">https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke</a></p>
<p>Did auth with my clusters again</p>
<pre><code>gcloud container clusters get-credentials $CLUSTER_NAME --region $REGION_NAME --project $PROJECT_NAME
</code></pre>
<p>It worked again.</p>
