Installing minikube on windows

3/28/2019

I'm trying to install minikube on Windows, but some errors appear in installation process as follows:

E0328 17:03:10.003001    5340 start.go:209] Error caching images:  Caching images for kubeadm: caching images: caching image C:\Users\User\.minikube\cache\images\k8s.gcr.io\kube-proxy_v1.14.0: getting destination path: parsing docker archive dst ref: replace a Win drive letter to a volume name: exec: "wmic": executable file not found in %PATH%
-   Preparing Kubernetes environment ...
X   Unable to load cached images: loading cached images: loading image C:\Users\User\.minikube\cache\images\k8s.gcr.io\k8s-dns-kube-dns-amd64_1.14.13: FindFirstFile C:\Users\User\.minikube\cache\images\k8s.gcr.io\k8s-dns-kube-dns-amd64_1.14.13: The system cannot find the path specified.
-   Pulling images required by Kubernetes v1.14.0 ...

Could you please help me?

-- HamiBU
kubernetes
minikube

1 Answer

3/29/2019

You did not provide how you are trying to install minikube and what else is installed on your PC. So it is hard to provide 100% accurate answer. I will try with providing a way that I use to install minikube on Windows, if that does not help please provide more information on what steps did you do that led to this error. I do not want to guess but it seems like you did not add the minikube binary to your PATH:

executable file not found in %PATH% - Preparing Kubernetes environment ...

First let's delete all the traces of your current installation. Run minikube delete go to C:\Users\current-user\ and delete .kube and .minikube folders.

Open Powershell and install chocolatey as explained here:

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

After installation run choco install minikube kubernetes-cli.

Now depending on what hypervisor you want to use you can follow steps from this tutorial (Hyper-V). You can use VirtualBox as well but then you won't be able to use Docker for Windows (assuming you want to) - you can read more in one of my answers here. Another possibility is to use Kubernetes in Docker for Windows as explained here - but you won't be using minikube in this scenario.

-- aurelius
Source: StackOverflow