English 中文(简体)
Minikube fails to start on Windows 11 Home and Docker Desktop
原标题:

I have Windows 11 Home (which does not allow Hyper-V, only Pro edition does). Installed WSL2 and Docker Desktop.

Installed Minikube using Chocolatey but it refused to start. Searching on SO, I found this advice in several posts, but it failed to work.

PS C:WINDOWSsystem32> docker system prune
WARNING! This will remove:
  - all stopped containers
  - all networks not used by at least one container
  - all dangling images
  - all dangling build cache

Are you sure you want to continue? [y/N] y
error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/prune": open //./pipe/docker_engine: The system cannot find the file specified.

PS C:WINDOWSsystem32> minikube delete
* Removed all traces of the "minikube" cluster.

PS C:WINDOWSsystem32> minikube start --driver=docker
* minikube v1.25.2 on Microsoft Windows 11 Home 10.0.22000 Build 22000
* Using the docker driver based on user configuration

X Exiting due to PROVIDER_DOCKER_VERSION_EXIT_1: "docker version --format -" exit status 1: error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.
* Documentation: https://minikube.sigs.k8s.io/docs/drivers/docker/
最佳回答

I thought of trying to have Docker Desktop already running before I start minikube.

From the Windows Start menu, I ran Docker Desktop in Administrator mode.

Now I ran the command again to remove old stuff,

PS C:WINDOWSsystem32> minikube delete
* Removed all traces of the "minikube" cluster.

and now specify the docker driver

PS C:WINDOWSsystem32> minikube start --driver=docker
* minikube v1.25.2 on Microsoft Windows 11 Home 10.0.22000 Build 22000
* Using the docker driver based on user configuration
* Starting control plane node minikube in cluster minikube
* Pulling base image ...
    > gcr.io/k8s-minikube/kicbase: 379.06 MiB / 379.06 MiB  100.00% 10.23 MiB p
* Creating docker container (CPUs=2, Memory=3000MB) ...
* Preparing Kubernetes v1.23.3 on Docker 20.10.12 ...
  - kubelet.housekeeping-interval=5m
  - Generating certificates and keys ...
  - Booting up control plane ...
  - Configuring RBAC rules ...
* Verifying Kubernetes components...
  - Using image gcr.io/k8s-minikube/storage-provisioner:v5
* Enabled addons: storage-provisioner, default-storageclass
* Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

Now verify minikube status

PS C:WINDOWSsystem32> minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

I don t know kubernetes as I am learning it, but it appears to have worked. I hope this will be useful to someone so they do not have to go off and spend $99 to upgrade to Windows Pro - as I was going to do if this did not work.

Update: Here is a link with more details How to run Kubernetes on Windows 11

问题回答

Make sure you have docker is running in you local machine.





相关问题
Unable to connect to docker container inside windows server

As title. I am developing a system with many docker images with ASP.Net MVC core projects. I am publishing these docker images into a docker engine installed on Windows Server OS, and I found that I ...

Only can see postgreSQL as an admin

After installed Wsl and Docker, can t access PSQL and other things. I was studying Docker, and installed the latest version. So far so good, I received an error about the WSL version, saw some ...

make docker-compose block until healthy without `depends_on`

I am working with a team that uses docker-compose to start a set of helper services, but does not use docker when the code is being developed. Here, docker-compose is just a convenient way to run the ...

change grafana port using docker host network

I am trying to spin up a grafana container in docker, however my setup in docker does not allow ipv4 forwarding and thus I cannot use the default bridge network in docker. All I can use is the host ...

Pip instalation for Python 3.11 in docker

I have Dockerfile to build image for Django project that uses Python 3.11 and runs in poetry environment (see content below). Problem is when I try to donwload get-pip.py file and run it using Python, ...

在 Dockerfile 中运行 composer install

我正在尝试将我的Laravel应用程序进行Docker化。 该应用程序已经构建并在Git中,但我将vendor文件夹添加到了.gitignore中。 我添加了一个Dockerfile,看起来像这样: FROM php:7.1-fpm-alpine RUN apk update ...

热门标签