'Docker desktop - kubernetes failed to start
I have installed Docker Desktop (version : 2.3.0.4) and enabled Kubernetes.
I deployed couple of PODS and everything was working fine, Since yesterday I am facing a weird issue mentioned below:
Unable to connect to the server: dial tcp 127.0.0.1:6443: connectex: No
connection could be made because the target machine actively refused it.
As such, no changes were made on my system. I am using Linux Containers on Windows 10 machine.
Following steps I have tried:
- Restarted the Docker Desktop
- Tried the same with minikube and Docker Desktop both
- Tried to disable the firewall but due to some permissions, I am not able to turn it off.
- I have reset the kubernetes cluster as well.
Solution 1:[1]
I tried numerous different changes to fix docker desktop kubernetes failing to start. What finally worked for me is...
Clicked the troubleshooting icon (it's a bug icon) and then chose Clean/Purge Data.*
Solution 2:[2]
For me, just "Clean and Purge" wasn't enough. Here is what I did.
- Log off VPN
- Go to bug and "Clean and Purge Data"
- Also choose "Reset to Factory Defaults"
- Restart Docker Desktop
- Choose "Enable Kubernetes"
At this point, the "Starting" took a while for Kubernetes to be enabled. Now's it all good.
$ kubectl get namespace
NAME STATUS AGE
default Active 80s
kube-node-lease Active 82s
kube-public Active 82s
kube-system Active 82s
Solution 3:[3]
I had similar problem.
- Install Minikube
I install minikube and I run as following on windows 10. starting of kubectl Then I gave permission for docker.
- Check cluster-info
When I check cluster-info result as following cluster info results
- Try to get pods
When I try to get pods I did not get any error.
Solution 4:[4]
As @N-ate mentioned above, after clicking Clean/Purge Data which removes all downloaded images from my computer, now docker and kubernates are running properly.
As you can see in the image below, I only have kubernates images running on docker and it takes most of the allocated memory. I guess the failure of starting kubernates was related to this memory issue.

Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | tom |
| Solution 3 | |
| Solution 4 | Ali Sherafat |

