在 Windows 上安装 minikube [英] Installing minikube on windows

查看:74
本文介绍了在 Windows 上安装 minikube的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Windows 上安装 minikube,但是在安装过程中出现了一些错误,如下所示:

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 ...

你能帮我吗?

推荐答案

您没有提供您尝试安装 minikube 的方式以及您的 PC 上还安装了什么.所以很难提供 100% 准确的答案.我将尝试提供一种用于在 Windows 上安装 minikube 的方法,如果这没有帮助,请提供有关您执行了哪些步骤导致此错误的更多信息.我不想猜测,但您似乎没有添加 minikube二进制到您的路径:

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:

在 %PATH% 中找不到可执行文件- 准备Kubernetes环境...

首先让我们删除当前安装的所有痕迹.运行 minikube delete 到 C:\Users\current-user\ 并删除 .kube.minikube 文件夹.

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.

打开 Powershell 并按照 此处的说明安装 Chocolatey:

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'))

安装后运行choco install minikube kubernetes-cli.

现在,根据您要使用的虚拟机管理程序,您可以按照以下步骤操作 教程 (Hyper-V).您也可以使用 VirtualBox,但随后您将无法将 Docker 用于 Windows(假设您愿意)-您可以在我的一个答案中阅读更多内容 此处.另一种可能性是在 Windows 的 Docker 中使用 Kubernetes,如此处所述 - 但在这种情况下,您不会使用 minikube.

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.

这篇关于在 Windows 上安装 minikube的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆