No connection could be made because the target machine actively refused it. "Kubernetes on Docker for Windows"
There is an issue with docker for windows when the HOMEDRIVE
is set my a corporate policy.
If you set the $KUBECONFIG
environment variable to C:\Users\my_username\.kube\config
(make sure the $HOME
environment variables expands, don't use $HOME
itself.) It should work.
Further info: https://github.com/docker/for-win/issues/1651
I found that Docker for Windows correctly updated my kubectl config file, but on Windows 10 Enterprise there is no environment variable called "HOME".
So kubectl cant find the config file, C:\users\{userid}\.kube\config
Adding environment variable HOME=C:\users\{userid}
solved the issue on my machine.