<p>I'm following the kOps tutorial to set up a cluster on AWS. I am able to create a cluster with</p>
<pre><code>kops create cluster
kops update cluster --yes
</code></pre>
<p>However, when validating whether my cluster is set up correctly with</p>
<pre><code>kops validate cluster
</code></pre>
<p>I get stuck with error:</p>
<pre><code>unexpected error during validation: error listing nodes: Unauthorized
</code></pre>
<p>The same error happens in many other kOps operations.</p>
<p>I checked my kOps/K8s version and it is 1.19:</p>
<pre><code>&gt; kops version
Version 1.19.1 (git-8589b4d157a9cb05c54e320c77b0724c4dd094b2)

&gt; kubectl version
Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;20&quot; ...
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;19&quot; ...
</code></pre>
<p>How can I fix this?</p>

<p>As of kOps 1.19 there are two reasons you will suddenly get this error:</p>
<ol>
<li>If you delete a cluster and reprovision it, your old admin is not removed from the kubeconfig and kOps/kubectl tries to reuse it.</li>
<li>New certificates have a TTL of 18h by default, so you need to reprovision them about once a day.</li>
</ol>
<p>Both issues above are fixed by running <code>kops export kubecfg --admin</code>.</p>
<p>Note that using the default TLS credentials is discouraged. Consider things like using an OIDC provider instead.</p>
