<p>I've setup a K8s cluster and got the config file which I have placed in the 
username/.kube directory</p>

<p>I can't seem to workout how to link my Powershell Kubectl to this config file by default. For instance if I try and run the following command I don't get the cluster I've setup.</p>

<pre><code>kubectl config get-contexts
</code></pre>

<p>If however, I run the following command, I do get a list of my current nodes</p>

<pre><code>kubectl --kubeconfig="cluster-kubeconfig.yaml" get nodes
</code></pre>

<p>Copy contents of <code>cluster-kubeconfig.yaml</code> file to <code>$HOME/.kube/config</code></p>

<p>This will be the default kubernetes context file.</p>

<p>You can also override and point to any other custom kubernetes context using</p>

<pre><code> $Env:KUBECONFIG=("/path/to/cluster-kubeconfig.yaml")
</code></pre>

<p>as mentioned <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#windows-powershell-1" rel="noreferrer">here</a>.</p>

<p>For more info check <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/" rel="noreferrer">this</a> out.</p>

<p>Hope this helps.</p>
