Search code examples
windowsdockerkubernetes

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?


Solution

  • 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