Trying to start the kubernetes in Docker-Desktop but it's stuck

Viewed 5935

Update The issue is resolved.

  1. I shutdown docker desktop.
  2. Deleted C:\ProgramData\DockerDesktop and .kube folder
  3. Restarted docker desktop
  4. reset docker desktop to factory defaults
  5. and restarted it again and it worked.

I have started learning Kubernetes and Dockers yesterday. I installed Docker-Desktop today and my docker container is running. When i check the enable kubernetes option on Docker-Desktop it's not running. It just shows me a loading and below it just shows kubernete starting.
Photo of my Docker Desktop What i have tried:

  1. Uninstalling Docker Desktop and reinstalling it
  2. Reset Kubernetes Cluster
  3. Reset to Factory default

I have tried other solutions too which i found here on stackflow like:

  1. Running it as an Administrator
  2. Run this on powershell and then try to start kubernetes [Environment]::SetEnvironmentVariable("KUBECONFIG", $HOME + "\.kube\config", [EnvironmentVariableTarget]::Machine)

But None of the solutions is trying to fix the problem im having.

Addition Information:

  1. Im running Docker Desktop on Windows 10 pro
  2. Docker Version: 2.2.0.5 Kubernetes version: v1.15.5
4 Answers

I fixed it! I deleted the config file i.e ~/.kube/config then I uninstalled the app through the Troubleshoot window. I reinstalled and enabled kubernetes which required the internet to download the necessary files and after a while kubernetes was running. I believe its due to the internet connection during the installation of kubernetes files that causes problems.Here is the Troubleshoot window where you can access the uninstall button

Your update is right. That's what worked for me (on Windows 10) :

  1. Shutdown Docker Desktop
  2. Delete .kube folder (path : C:\Users\YourUserName\.kube)
  3. Restart Docker Desktop
  4. Reset Docker Desktop (press the scarab button (or also, debug or troubleshoot button) and click on "Reset to factory defaults")
  5. Shutdown Docker Desktop
  6. Restart Docker Desktop
  7. Now, in the settings and in Kubernetes tab, Enable again Kubernetes (Check "Enable Kubernetes" option)

That's what worked for me and hope it's gonna be useful for you.

Just follow these steps

  1. stop docker for desktop
  2. remove the folder ~/Library/Group\ Containers/group.com.docker/pki
   rm -rf ~/Library/Group\ Containers/group.com.docker/pki
  1. start docker for destkop

Found the solution here

And given that every time I try to start "Docker for Desktop" Kubernetes get stuck, to better investigate for me was useful remove the kube autostart from the configuration.

Just edit the file:

~/Library/Group\ Containers/group.com.docker/settings.json

And change kubernetesEnabled value to false

Steps to follow :

  1. Quit Dockerdesktop
  2. remove ~/.kube/config And ~/.kube/cache/*
  3. restart start the docker desktop.

If you are behind a corporate vpn. then make sure you are able to configure proxy for the internet access in docker destop in preferences->Proxy. or you can disconnect from vpn and let the kubernates cluster setup for the first time. After that you can configure the proxy.

Related