Skip to content
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

docker desktop kubernetes failed to start #3631

Closed
2 tasks
zhangzhenhuajack opened this issue Apr 21, 2019 · 16 comments
Closed
2 tasks

docker desktop kubernetes failed to start #3631

zhangzhenhuajack opened this issue Apr 21, 2019 · 16 comments

Comments

@zhangzhenhuajack
Copy link

14998DA9-3D45-4941-B41A-015FC8FC10B1/20190421022614

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

Actual behavior

Information

  • macOS Version:

Diagnostic logs

Docker for Mac: version...

Steps to reproduce the behavior

  1. ...
  2. ...
@sdavis3
Copy link

sdavis3 commented Apr 22, 2019

I currently have the same issue.

Diagnostics ID: 401C61D7-4808-491B-AFFF-0A25586E4B5C/20190422181917

@JCzz
Copy link

JCzz commented Apr 22, 2019

Same same:
Diagnostics ID: 92EF17A7-A4B6-4E98-91C3-F910FF6A08CB/20190422212548

@vishnuvp
Copy link

I am also facing the issue.
Docker Desktop version: 2.0.0.3
macOS Version: 10.14.4
Diagnostics id: 5A9A3879-4203-44D7-AF48-2B37D74E9712/20190423113111

@jaredpetersen
Copy link

I was running into this as well and nothing in any of the other threads was helping. Added Google's DNS to the list of DNS servers in System Preferences -> Network -> Wifi -> Advanced... -> DNS and restarted Docker for Mac. Kubernetes came up in a couple of minutes.

@knoxilla
Copy link

Same here! I would like to disable Kubernetes, but b/t it failed to start, the Preferences tab for Kubernetes has all options greyed out.

Is there a way to disable k8s from the CLI before restarting Docker Desktop?

Docker Desktop version: 2.0.3.0 (31778)
Channel: Edge
macOS Version: 10.14.4
Diagnostic ID: 7032A9B6-0302-4C71-A438-A37B38B55612/20190426165202

@11shobhit
Copy link

same here
its failing often
yesterday i faced the same issue, i reset the setup and did that again
today again it fails to restart

@runzhliu
Copy link

same here with Diagnostic ID: 579109B7-0857-4867-B984-93C8FAD12583/20190529133328

@adrian
Copy link

adrian commented May 29, 2019

I resolved this problem by,

  • Temporarily disabling of my employer's VPN software
  • Restarting Docker Desktop
  • Clicking the "Reset Kubernetes cluster" button on the Preferences -> Reset tab

@docker-robott
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

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.
/lifecycle stale

@tombensve
Copy link

I still have this problem with the latest version of Docker. None of the suggestions here work! I have no VPN active, even turned off my firewall, and added gogoles DNS servers as suggested above, but still it is physically impossible for Docker to start kubernetes. It just tries forever and ever and ever ...

I'm running Mojave. Can't upgrade to Catalina yet since there are things I need that are guaranteed to not work in Catalina right now (they claim this is because of bad information from Apple, which I find very plausible).

@amimimor
Copy link

same here with 1EBC056B-E322-4D18-A7FE-48F2E844CBB0/20191127082124

@ghost
Copy link

ghost commented Mar 3, 2020

I am having the same issue. Diagnostics ID is FE32F84A-8BAC-4361-B038-20C6722286DC/20200303225231

@ghost
Copy link

ghost commented Mar 3, 2020

I changed swap size to 512MiB from 1GiB and it fixed the problem.

@mikechen66
Copy link

mikechen66 commented Jun 7, 2020

I have finally solved the Kubernetes staring problem with the five strict steps as follows.

1. Select the items marked with the red color in Troubleshoot

1). Reset Kubernetes cluster
2). Clean/Purge data
3). Reset to factory setting
4). Uninstall Docker for Mac

2. Remove Docker for Mac from Applications

There are two ways. One is to remove Docker for Mac from Applications, and another is to replace the Docker for Mac with the new installation listed in the step 3.

3. Re-install Docker for Mac

1). Click Docker.dmg

2). Drag and drop Docker for Mac to Applications

If the old Docker has not manually removed from Applications. Mac usually reminds a user to replace the old one with a new installed Docker for Mac.

3). Open and Verify Docker for Mac

4. Remove both pki and kube

$ rm -rf ~/Library/Group\ Containers/group.com.docker/pki/
$ rm -rf ~/.kube

5. Set the items in Preferences

1). General

Do not set tick for Start Docker Desktop when you log in. It wastes a lot of time while dealing with the Troubleshoot.

2). Resources --> Advanced --> Swap

It is preferable to set Swap to 0 GB (or zero GB) because Kubernetes sometimes
keep starting while the Swap is set to any number being larger than 0 GB. Kubernetes is designed to use up the DRAM resource according to the Google principle. Swap is regarded as a bad habit in Kubernetes.

For example. it is unavoidable to be failed while developers try to set up Swap on the Nvidia portable machines including Jetson Xavier, TX2 and Jetson Nano clusters for Kubernetes. The developers have to set the following command to disable the Swap functionality in the above-mentioned Nvidia machines.

$ sudo swapoff -a
(for Nvidia portable machines)

3). Kubernetes

Select the tick to Enable Kubernetes

4). Apply & Restart

Conclusion

It usually take from 6 to 15 minutes to complete the setting depending on the factors including network speed, vpn and machine capabilities. It still has the unforeseeable factors to stop the successful configuration of Kubernetes even though adopting the above-strict steps. Or it functions bad for re-starting sometimes. I am wondering why Docker has not solved the big issue even though it has been existed for more than 2 years.

@econtal
Copy link

econtal commented Jun 23, 2020

I also had the same error "docker desktop kubernetes failed to start" when I reached the maximum storage space configured in Docker-for-Mac.

It may seems obvious but it took me some time to figure it out, so I'm mentioning here for people googling the issue. For me running these fixed it:

docker system prune -a
docker volume prune

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

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.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jul 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests