I have issue with version 3.1 of Docker Desktop and on enabling kubernetes its always stuck at Starting looking at logs in i can see repeating the following log from (AppData/Local/Docker/log.txt):
<!-- begin snippet: js hide: false console: true babel: false --><!-- language: lang-html -->\"https://kubernetes.docker.internal:6443/apis/coordination.k8s.io/v1/namespaces/kube-node-lease/leases/docker-desktop\": net/http: TLS handshake timeout"
[16:15:55.267][GoBackendProcess ][Info ] msg="external: POST /events 200 \"DockerDesktopGo\" \"\""
[16:16:06.268][ApiProxy ][Info ] msg="cannot get lease for master node: Get \"https://kubernetes.docker.internal:6443/apis/coordination.k8s.io/v1/namespaces/kube-node-lease/leases/docker-desktop\": net/http: TLS handshake timeout"
[16:16:06.268][GoBackendProcess ][Info ] msg="external: POST /events 200 \"DockerDesktopGo\" \"\""
<!-- end snippet -->I have tried deleting the pki folder inside AppData/Local/Docker , but without any success.
This looks like a common issue reported here or here, which occurs also on MacOS. As per this comment, apart from deleting pki
, you should also remove .kube
directory and restart Docker
:
I have workarounded as:
rm -rf ~/Library/Group\ Containers/group.com.docker/pki/ rm -rf ~/.kube
And restarting docker
As mentioned in this comment, the respective directory on Windows can be found in:
C:\Users\<USER>\AppData\Local\Docker
If none of the above helps, as the last resort solution you may try to completely re-install your Docker Desktop as there might be some remnants of the previous installation causing the issue. Compare with this comment.