Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker for Windows stuck at “Kubernetes is Starting”

I'm using Docker Desktop on windows 10 pro with this docker information docker info

My docker is just fine and I can use docker commands completely. But when it comes to enabling kubernetes. I can't enable it. I just go to docker-desktop settings and check the enable Kubernetes button. but it stuck at "Starting ..." situation. This is the picture: Picture I have used so many ways to solve the problem(e.g: turn the firewall off, delete some docker files) but nothing happens. In the log.txt file, in C:\Users\<usr>\AppData\Local\Docker I see the error:

cannot get lease for master node: Get "https://kubernetes.docker.internal:6443/apis/coordination.k8s.io/v1/namespaces/kube-node-lease/leases/docker-desktop": dial TCP: lookup Kubernetes.docker.internal: no such host

like image 969
mosaddegh warner Avatar asked Sep 12 '25 16:09

mosaddegh warner


1 Answers

I had the same issue. I resolve it , changing the HOSTS file in Widnows (located at C:\Windows\System32\drivers\etc) and adding

127.0.0.1 kubernetes.docker.internal

( I also disable for this operation firewall and antivirus and set 8.8.8.8 in DNS , in docker desktop setting )

like image 160
f0rs4k3n Avatar answered Sep 14 '25 11:09

f0rs4k3n