<p>I am deploying a 2-node Kubernetes cluster on GCloud using kops with the following commands:</p>
<pre><code>kops create cluster part1.k8s.local --zones europe-west3-a --node-count 2 --node-image ubuntu-os-cloud/ubuntu-2004-focal-v20210129 --node-size &quot;e2-standard-2&quot; --ssh-public-key ~/.ssh/id_rsa.pub --state ${KOPS_STATE_STORE}/ --project=${PROJECT}
</code></pre>
<pre><code>kops update cluster --name part1.k8s.local --yes --admin
</code></pre>
<p>I then wait for the cluster to be ready and get the external IP of one of the nodes using:</p>
<pre><code>kubectl get nodes -o wide
</code></pre>
<p>However when I try to login to the node I get:</p>
<pre><code>ssh -i ~/.ssh/id_rsa admin@&lt;PUBLIC_IP&gt;
admin@&lt;PUBLIC_IP&gt;: Permission denied (publickey).
</code></pre>
<p>Checking the permissions the nodes should be able to accept SSH connections and I can connect to the VMs using the GCloud UI.</p>
<p>What am I doing wrong? Thanks!</p>

<p>The answer can be found here: <a href="https://github.com/kubernetes/kops/issues/10770" rel="nofollow noreferrer">https://github.com/kubernetes/kops/issues/10770</a></p>
