Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker for Windows stuck at "Kubernetes is Starting" after updating to version 2.1.1.0 Edge (or Stable)

I recently updated my Docker for Desktop to latest Edge channel version: 2.1.1.0 on a Windows 10 machine. Unfortunately, after updating, Kubernetes was no longer working as it is always stuck at "Kubernetes is Starting".

I have tried the following so far.

  • Restarting Docker
  • Resetting the Kubernetes Cluster
  • Restoring Factory Default settings
  • Restarting machine
  • Uninstalling and reinstalling Docker

Nothing seems to be working. How can I resolve it?

like image 354
Irshad P I Avatar asked Aug 29 '19 13:08

Irshad P I


People also ask

How do I get rid of Kubernetes Docker?

Go to Preferences , open Reset tab, and click Reset Kubernetes cluster . All object that have been created with Kubectl before that will be deleted. You can also reset docker VM image ( Reset disk image ) and all settings ( Reset to factory defaults ) or even uninstall Docker.

How long does Kubernetes take to start?

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.

Can I run Kubernetes on Windows 10?

What options do you have for installing Kubernetes on Windows 10? Similar to Docker, Kubernetes has constraints that you need to watch out for. Kubernetes can run Windows and Linux containers. However, you can only run Windows containers on Windows nodes and Linux containers on Linux nodes.

Do I need to install Docker before Kubernetes?

Can You Use Docker Without Kubernetes? The short and simple answer is yes, Docker can function without Kubernetes. You see, Docker is a standalone software designed to run containerized applications. Since container creation is part of Docker, you don't need any separate software for Docker to execute.


1 Answers

After hours of trying out different things, here is what finally helped me:

  1. Restore Docker to Factory Default settings and Quit Docker for Desktop

  2. Delete the folder C:\ProgramData\DockerDesktop\pki (Make a backup of it just in case). Note that many have reported the folder to be located elsewhere: C:\Users\<user_name>\AppData\Local\Docker\pki

  3. Delete the folder ~\.kube\ (Again make a backup to be safe)

  4. Start Docker again, open Docker settings, make the necessary configuration changes (adding proxy, setting resource limits, etc..), Enable Kubernetes and let it start

  5. Wait a while and both Docker and Kubernetes will be up now.

When you try to connect to Kubernetes using kubectl, you might face another issue like

Unable to connect to the server: x509: certificate signed by unknown authority 

You can solve this by

  1. Open ~.kube\config in a text editor
  2. Replace https://kubernetes.docker.internal:6443 to https://localhost:6443
  3. Try connecting again.

Or if you are behind a (corporate) proxy: add kubernetes.docker.internal to NO_PROXY (eg export NO_PROXY=kubernetes.docker.internal), given that the proxy is configured correctly.

If this still doesn't resolve your issue, go through the logs at C:\ProgramData\DockerDesktop\log\ to debug the issue further

like image 190
Irshad P I Avatar answered Oct 11 '22 13:10

Irshad P I