-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kubernetes not starting in Docker desktop #5027
Comments
I have found that, maybe, this is a duplicated of 2990. But this appears as solved! I have workarounded as:
And restarting docker |
Fixed my issues! |
Fixed my issues too ! Thanks. Big Sur 11.0.1 |
I am running the same issue. From the console log, below 3 PIDs periodically generating below error messages.
OS: macOS Catalina 10.15.7 |
As an alternative to Docker for Mac's single Kubernetes you can use Docker for Mac to create a multi-node Kubernetes cluster with the Kubernetes feature disabled. Here's a tutorial https://habd.as/post/kubernetes-macos-k3s-k3d-rancher/ |
I have tried a lots of ways to try to let K8S running in my macOS, the below error message occurs all the time.
|
I was fighting this issue for 2+ days and finally fixed the issue... my /etc/hosts file was corrupted/malformed (probably from some other application). THE FIX
then reset docker and BOOM up and running no problem! |
Same error here |
I am not able to do k8s working also. It's sad! I will need to try minikube instead. |
@ClimberBear's solution up above at #5027 (comment) worked perfectly |
@rs-renato use kind rather than minikube. Kind is like k8s in a container. |
Tried many times, can not solve the problem in my docker-for-macos. |
@benbendemo how have you installed Docker ? |
Installed by the dmg file downloaded from docker official website. |
I also had the "cannot get lease for master node: an error on the server" issue and Kubernetes would not start from Docker Desktop. My /etc/hosts file was fine. I tried cleaning the .kube directory and all sorts of things. Finally, I uninstalled Docker Desktop, downloaded and re-installed it, increased the Docker resources and enabled Kubernetes - this worked. I suspect in my particular case, some remnant of my past experiments with docker, kubernetes, minikube, etc. was interfering. Anyway, if all else fails, try a complete re-install of Docker Desktop. |
This command fixed my issue (docker version 3.2.0)
|
Indeed: recreating %windir%\drivers\etc\hosts as a plain 'ASCI text' file and populating it with the following (plus what more I need for other purposes) overcame this (and the next) error:
|
Hello , i am having exactly this same issue , but on a Windows 10 machine, installed docker desktop, and when i try installing Kubernetes, it says "Starting..." and stays there forever :) . I have also tried resetting docker desktop to factory settings, I have also tried removing the following directory as suggested on some posts: c:\Users\claud\AppData\Local\Docker\pki> (it seems when docker desktop starts up it recreates that directory again...) None of these did not work unfortunately. My docker desktop version is 3.2.1 |
Only can repeat: ensuring the C:\Windows\system32\drivers\etc\hosts file is plain ascii overcame this problem for me. Using cygwin 'file' command on it, it did say: UTF-8 Unicode (with BOM) text, with CRLF line terminators After recreating the file from scratch 'file' now says: ASCII text, with CRLF, LF line terminators |
I am seeing the same issue on macOS 11.2.3 (Big Sur) - none of the above suggestions worked. Kubernetes: v1.19.7 I ended up using the 'Clean / Purge data' option, which did work. |
I did,
|
Is this issue getting priority attention? I'm blocked by it. I have no idea what triggered the problem; most likely an update to docker since the last time I used the local k8s. My version is now 3.2.2 (61853) with kubernetes v1.19.7.
Tried all the workarounds noted above: no amount of file-removing, updating |
@instantlinux curious, did you try the workaround I suggested on Jan 9? |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Dunno if this should be closed since after the latest update my dev env is broken because docker desktop will not stop start nor reset k8s. Tired reinstalling, deleting the ~/.kube file. Probably should just use bare metal on a pi and not have to worry about forced updates breaking my env while I sleep. |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Expected behavior
I have activated Kubernetes marking Enable Kubernetes and Show system container in Kubernetes section of preferences.
I expect to have kubernetes up & running
Actual behavior
Kubernetes shows "Starting" and never finish to start
The log shows
repeating forever
Information
I have checked my docker is up to date
I have checked localhost in /etc/hosts file is correct
Restarting the Mac doesn't solve the problem
I have found similar error in #2985, but, as commented, my hosts file is correct
I have found similar error here AliyunContainerService/k8s-for-docker-desktop#56 (reported as solved)
The text was updated successfully, but these errors were encountered: