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.
Nothing seems to be working. How can I resolve it?
After hours of trying out different things, here is what finally helped me:
Restore Docker to Factory Default settings and Quit Docker for Desktop
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
Delete the folder ~\.kube\
(Again make a backup to be safe)
Start Docker again, open Docker settings, make the necessary configuration changes (adding proxy, setting resource limits, etc..), Enable Kubernetes and let it start
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
https://kubernetes.docker.internal:6443
to https://localhost:6443
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