Kapoios
Kapoios

Reputation: 718

Cannot start minikube in Windows 10 with Docker as driver

I tried to run Minikube v1.19.0 on my laptop first time, using Docker as driver, but no luck though. Here are the execution logs:

PS C:\Users\______\kubernetes> minikube start --driver=docker --alsologtostderr
I0916 19:01:44.059272   20464 out.go:278] Setting OutFile to fd 96 ...
I0916 19:01:44.059272   20464 out.go:291] Setting ErrFile to fd 100...
W0916 19:01:44.091562   20464 root.go:292] Error reading config file at C:\Users\proskos\.minikube\config\config.json: open C:\Users\proskos\.minikube\config\config.json: The system cannot find the file specified.
I0916 19:01:44.097634   20464 out.go:285] Setting JSON to false
I0916 19:01:44.110479   20464 start.go:108] hostinfo: {"hostname":"--------","uptime":118298,"bootTime":1631689806,"procs":291,"os":"windows","platform":"Microsoft Windows 10 Enterprise","platformFamily":"Standalone Workstation","platformVersion":"10.0.18363 Build 18363","kernelVersion":"10.0.18363 Build 18363","kernelArch":"x86_64","virtualizationSystem":"","virtualizationRole":"","hostId":"---------------"}
W0916 19:01:44.110479   20464 start.go:116] gopshost.Virtualization returned error: not implemented yet
I0916 19:01:44.113153   20464 out.go:157] πŸ˜„  minikube v1.19.0 on Microsoft Windows 10 Enterprise 10.0.18363 Build 18363
πŸ˜„  minikube v1.19.0 on Microsoft Windows 10 Enterprise 10.0.18363 Build 18363
I0916 19:01:44.116296   20464 driver.go:322] Setting default libvirt URI to qemu:///system
W0916 19:01:50.237519   20464 docker.go:108] docker version returned error: deadline exceeded running "docker version --format {{.Server.Os}}-{{.Server.Version}}": exit status 1
I0916 19:01:50.244288   20464 out.go:157] ✨  Using the docker driver based on user configuration
✨  Using the docker driver based on user configuration
I0916 19:01:50.244288   20464 start.go:276] selected driver: docker
I0916 19:01:50.244810   20464 start.go:718] validating driver "docker" against <nil>
I0916 19:01:50.244810   20464 start.go:729] status for docker: {Installed:true Healthy:false Running:false NeedsImprovement:false Error:exit status 1
deadline exceeded running "docker version --format {{.Server.Os}}-{{.Server.Version}}"
k8s.io/minikube/pkg/minikube/registry/drvs/docker.status
        /app/pkg/minikube/registry/drvs/docker/docker.go:104
k8s.io/minikube/pkg/minikube/registry.Status
        /app/pkg/minikube/registry/global.go:140
k8s.io/minikube/pkg/minikube/driver.Status
        /app/pkg/minikube/driver/driver.go:305
k8s.io/minikube/cmd/minikube/cmd.selectDriver
github.com/spf13/cobra.(*Command).execute
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:960
github.com/spf13/cobra.(*Command).Execute
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:897
k8s.io/minikube/cmd/minikube/cmd.Execute
        /app/cmd/minikube/cmd/root.go:156
main.main
        /app/cmd/minikube/main.go:82
runtime.main
        /usr/local/go/src/runtime/proc.go:225
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1371 Reason:PROVIDER_DOCKER_DEADLINE_EXCEEDED Fix:Restart the Docker service Doc:https://minikube.sigs.k8s.io/docs/drivers/docker/}
I0916 19:01:50.250032   20464 out.go:157]

W0916 19:01:50.250390   20464 out.go:222] πŸ’£  Exiting due to PROVIDER_DOCKER_NOT_RUNNING: deadline exceeded running "docker version --format -": exit status 1
πŸ’£  Exiting due to PROVIDER_DOCKER_NOT_RUNNING: deadline exceeded running "docker version --format -": exit status 1
W0916 19:01:50.250390   20464 out.go:222] πŸ’‘  Suggestion: Restart the Docker service
πŸ’‘  Suggestion: Restart the Docker service
W0916 19:01:50.250924   20464 out.go:222] πŸ“˜  Documentation: https://minikube.sigs.k8s.io/docs/drivers/docker/
πŸ“˜  Documentation: https://minikube.sigs.k8s.io/docs/drivers/docker/
I0916 19:01:50.252904   20464 out.go:157]

Docker Desktop Service is up and running, though. The problem wasn't resolved by restarting Docker. Here are the details of my Docker desktop installation:

PS C:\Users\______\kubernetes> docker version
 API version:       1.41
 Go version:        go1.16.6
 Git commit:        3967b7d
 Built:             Fri Jul 30 19:58:50 2021
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.8
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.6
  Git commit:       75249d8
  Built:            Fri Jul 30 19:52:10 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.9
  GitCommit:        e25210fe30a0a703442421b0f60afac609f950a3
 runc:
  Version:          1.0.1
  GitCommit:        v1.0.1-0-g4144b63
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Finally, my Docker Desktop installation is configured to run Linux containers:

docker info --format '{{.OSType}}'
linux

Could you help me find out why Minikube can't communicate with Docker?

Upvotes: 3

Views: 10877

Answers (5)

Jorge Freitas
Jorge Freitas

Reputation: 938

In my case, nothing was working until I updated the docker desktop to the latest version.

Then the command minikube startβ€Š-β€Šdriver=docker worked as expected.

Upvotes: 0

WestMountain
WestMountain

Reputation: 645

open the docker desktop first, then run

minikube start --driver=docker

Upvotes: 1

Muni Chittem
Muni Chittem

Reputation: 1146

check If docker services are running or not from your computer. I got this error because my docker service is stopped in computer.

After starting the docker and then run the following command - minikube start

Upvotes: 0

Shubham Phegade
Shubham Phegade

Reputation: 121

Try these three commands sequentially:

  1. minikube config set driver docker
  2. minikube delete
  3. minikube start --driver=docker

Upvotes: 12

Vit
Vit

Reputation: 8491

I might be wrong but in my personal opinion this is a docker version issue.

It is not a typical behavior to have such error in the situation when docker service is up&running.

status for docker: {Installed:true Healthy:false Running:false NeedsImprovement:false Error:exit status 1
deadline exceeded running "docker version --format {{.Server.Os}}-{{.Server.Version}}"

and 

Exiting due to PROVIDER_DOCKER_NOT_RUNNING: deadline exceeded running "docker version --format -": exit status 1
πŸ’£  Exiting due to PROVIDER_DOCKER_NOT_RUNNING: deadline exceeded running "docker version --format -": exit status 1

My recommendations:

  1. docker system prune to completeley delete docker cache, images, etc
  2. remove completely minikube
  3. now 2 options. Either try to again start minikube --driver-docker or uninstall docker and install 1-2 versions below. I would go in your case with last one.

Upvotes: 0

Related Questions