<p>I have following error on Windows10 after installing <code>kubectl</code> via 
<code>choco install kubernetes-cli</code>:</p>

<p><code>PowerShell</code></p>

<pre><code>PS C:\Users\userA&gt; kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:38:32Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"windows/amd64"}
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
</code></pre>

<p><code>Cmd</code></p>

<pre><code>C:\Users\userA&gt;kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:38:32Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"windows/amd64"}
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
</code></pre>

<p>I have created <code>.kube</code> folder (<code>C:\Users\userA\.kube</code>) and inside of it an empty <code>config</code> file </p>

<p>I set windows environment variable:</p>

<p><code>Variable_name</code>: <code>KUBECONFIG</code>
<code>value</code>: <code>C:\Users\userA\.kube\config</code></p>

<p><strong>EDIT:</strong> I tested it with <code>running</code> minikube:</p>

<p><a href="https://i.stack.imgur.com/E1W7i.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E1W7i.png" alt="enter image description here"></a></p>

tryingHard
<p>You need to start the server  first, with:</p>

<pre><code>minikube start
</code></pre>

<p>Edit: As op tries to use hyper-v the following command tells minikube to use hyper-v</p>

<pre><code>minikube start --vm-driver hyperv --hyperv-virtual-switch "Primary Virtual Switch"
</code></pre>

<p>To get this workling it is also neccessary to set a virtual switch named "Primary Virtual Switch" in hyper-v.</p>
