<p>In CKAD exam I have been asked to SSH to other node in cluster to do some kubectl operations like <code>kubectl get all</code>, though with that getting below:</p>
<blockquote>
<p>The connection to the server localhost:8080 was refused - did you specify the right host or port?</p>
</blockquote>
<p>Tried doing sudo, but did not work and did check kubectl config view (can see empty file in client node)</p>
<p>How to do this?</p>

<p>You need to list the available nodes in the cluster, but first, make sure you're using the correct context:</p>
<pre><code>k get nodes
</code></pre>
<p>You will get the available noted like:<br />
<code>node-0 node-1</code> (to see which one is the worker node, or if you were asked to ssh to a specific node then copy-paste it) should be:</p>
<pre><code>ssh node-0
</code></pre>
<p>This is to create some files/directory (ex: to persist data) once you finish return to the master to complete your task.</p>
