<p>I created a Kubernetes cluster through Kops. The configuration and the ssh keys were in a machine that I don't have access to anymore. Is it possible to ssh to the nodes through kops even if I have lost the key? I see there is a command - </p>

<blockquote>
  <p>kops get secrets</p>
</blockquote>

<p>This gives me all the secrets. Can I use this to get ssh access to the nodes and how to do it?</p>

<p>I see the cluster state is stored in S3. Does it store the secret key as well?</p>

<p>You can't recover the private key, but you should be able install a new public key following this procedure:</p>

<pre><code>kops delete secret --name &lt;clustername&gt; sshpublickey admin
kops create secret --name &lt;clustername&gt; sshpublickey admin -i ~/.ssh/newkey.pub
kops update cluster --yes to reconfigure the auto-scaling groups
kops rolling-update cluster --name &lt;clustername&gt; --yes to immediately roll all the machines so they have the new key (optional)
</code></pre>

<p>Taken from this document:</p>

<p><a href="https://github.com/kubernetes/kops/blob/master/docs/security.md#ssh-access" rel="noreferrer">https://github.com/kubernetes/kops/blob/master/docs/security.md#ssh-access</a></p>
