how to make kubernetes to run in docker for desktop in windows

3/22/2019

looks like this using windows version 10, docker for windows(docker verion) : 18.09.2

how to resolve this issue ?

-- PRUDHVI CHOWDHARY NEKKALAPUDI
docker
kubernetes
windows

1 Answer

3/22/2019

Kubernetes should be running.

But check your cluster-info:

> kubectl cluster-info
Kubernetes master is running at http://localhost:8080

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

That is reported both in docker/machine and docker/for-win or kubernetes/minikube.

While the issue is pending, and if no firewall/proxy is involved, I have seen the error caused because the port is already taken.

See also this article:

Issue

The reason you are getting the error message is that Kuberentes is not looking into the correct configuration folder because the configuration path is not configured on the Windows 10 machine.

Solution

To fix the problem, I will run the command below that will tell Kubernetes where to find the configuration file on the machine.

Powershell
[Environment]::SetEnvironmentVariable("KUBECONFIG", $HOME + "\.kube\config", [EnvironmentVariableTarget]::Machine)
-- VonC
Source: StackOverflow