<p>I'm trying to connect to my kubernetes cluster on Digital Ocean using</p>
<pre><code>doctl kubernetes cluster kubeconfig save cluster_name
</code></pre>
<blockquote>
<p>the output of this command tells me that: Notice: Adding cluster
credentials to kubeconfig file found in
&quot;/home/akhateeb22/.kube/config&quot; Notice: Setting current-context to
name_of_context</p>
</blockquote>
<p>which is seem to be okay
but when i do <code>kubectl get nodes</code> i still get my local node not the Digital Ocean one
I check contexts i have, i got just one which is the local.
how to solve this issue?</p>

Abd allah Khateeb
<p>it seems that you need to change the context of your kubectl command.</p>
<p>first, run the command <code>kubectl config get-contexts</code> to list all the contexts you have in the <em>.kube/config</em> file, then change the context to the correct cluster with <code>kubectl config use-context &lt;context name&gt;</code></p>
