Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.



Bump into this issue earlier and the reason for this is kubectl (kubernetes) is not able to find your config file through a system variable called KUBECONFIG.

Create this environment variable in powershell.  Ensure that you have it point to a user folder called ".\kube\config".

For example,

$KUBECONFIG = $HOME + "\.kube\config"


You might need to restart your Kubernetes cluster. I didn't and then i run "kubectl get nodes" to quickly test if it is working.

If you are trying to setup kubernetes, there is a docker version that comes with Kubernetes and you should use this version 


Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm