<p>I have created kops cluster and getting below error when logging to the cluster.</p>

<p>Error log :</p>

<pre><code>*****INFO! KUBECONFIG env var set to /home/user/scripts/kube/kubeconfig.yaml
INFO! Testing kubectl connection....
error: You must be logged in to the server (Unauthorized)
ERROR! Test Failed, AWS role might not be recongized by cluster*****
</code></pre>

<p>Using script for iam-authentication and logged in to server with proper role before connecting.
I am able to login to other server which is in the same environment. tried with diff k8s version and diff configuration. </p>

<blockquote>
  <blockquote>
    <p>KUBECONFIG doesn't have any problem and same entry and token details like other cluster. 
    I can see the token with 'aws-iam-authenticator' command</p>
  </blockquote>
</blockquote>

<p>Went through most of the articles and didn't helped </p>

Ching Kast
<p>with kops vs1.19 you need to add <code>--admin</code>  or <code>--user</code> to update your kubernetes cluster and each time you log out of your server you have to export the cluster name and the storage bucket and then update the cluster again. this will work.</p>
