Reputation: 2154
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:
Upvotes: 82
Views: 84930
Reputation: 1
Check the Add the *.docker.internal
names ...
work for me
Upvotes: 0
Reputation: 749
Got the same issue and perform series of activity like below but still same issue.
Issue was...
I forgot to verify email which had used for created docker account, so please check your email and very account and issue will be fixed.
Upvotes: 0
Reputation: 6926
I tried numerous changes to fix docker desktop Kubernetes failing to start. What finally worked:
Clicked the troubleshooting icon (it's a bug icon at the top right corner) and then chose Clean/Purge Data.*
Upvotes: 172
Reputation: 11
I had a working Kubernetes (k8s) cluster with Docker v4.20. However, after installing a series of Windows updates and updating Docker Desktop to v4.22, both Kubernetes and the Docker engine failed to start. I had to reinstall Docker Desktop to get the Docker engine running again. Unfortunately, neither the factory reset nor the "Clean/Purge data" options helped with Kubernetes. However, using the "Reset Kubernetes cluster" option resolved the problem.
Upvotes: 0
Reputation: 1165
Note: #2 will remove any stack and data.
The above action will result this:
Upvotes: 0
Reputation: 91
My steps:
Upvotes: 9
Reputation: 165
My docker-desktop is running behind the company proxy server. I deleted following Proxy Env Variables from my windows OS.
HTTPS_PROXY:serveraddess
HTTP_PROXY:serveraddress
and I set up manual proxy in docker desktop.
Upvotes: 1
Reputation: 375
I don't know for others but for some reasons, the above suggested options didn't work for me while fixing K8s on Docker Desktop on Windows. Tried fixing by cleaning the cluster, resetting to default, restarting pc, installing previous versions of Docker Desktop, enabling my pc HiperVisor, and giving it more resource priority, and others but yet still K8s failed to start, even though the Docker starts.
I chanced on Minikube as an alternative tool (without UI) to create my cluster and interacted with it using Kubectl.
And K8s worked for me locally.
I followed this guide - https://minikube.sigs.k8s.io/docs/start/
Upvotes: 0
Reputation: 750
In my case, the corporate proxy server caused the Kubernetes startup to fail. Addiing *.docker.internal to the no_proxy hosts solved the issue.
Upvotes: 1
Reputation: 1913
I tried clean/purge data and resetting factory settings but that didn't worked.
I had to reset kubernetes cluster from here.
Upvotes: 20
Reputation: 55
Even I had similar problem after updating to Docker desktop(version 4.11.1). After I downgraded the version it works fine.
Troubleshooting steps
check is there any errors by running following command
kubectl get events|grep node
and make sure all pods are in running state.
kubectl get pods --namespace kube-system
Upvotes: -3
Reputation: 696
In my case, the Kubernetes (Docker Desktop on Mac) is not running properly though I can manage Pods, Services, etc., when I opened the Docker Desktop, it says
Kubernetes failed to start (red background)
I managed to fix the issue by resetting Docker Desktop and Prune/cleaning the storage.
Upvotes: 0
Reputation: 1493
For me, just "Clean and Purge" wasn't enough. Here is what I did.
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
Upvotes: 15
Reputation: 3855
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.
Upvotes: 0
Reputation: 1
I had similar problem.
I install minikube and I run as following on windows 10. starting of kubectl Then I gave permission for docker.
When I check cluster-info result as following cluster info results
When I try to get pods I did not get any error.
Upvotes: 0
Reputation: 2154
Finally,I found the solution for this.
VPN was causing the issue, I am using my office laptop and after restart, VPN was enabled and logged-in and due to this Kubernetes was not working.
After disabling the VPN, Kubernetes cluster working fine.
Hope that helps others as well.
Upvotes: 22