我正在尝试在Windows上安装minikube
,但是安装过程中出现一些错误,如下所示:
E0328 17:03:10.003001 5340 start.go:209] Error caching images: Caching images for kubeadm: caching images: caching image C:UsersUser.minikubecacheimagesk8s.gcr.iokube-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:UsersUser.minikubecacheimagesk8s.gcr.iok8s-dns-kube-dns-amd64_1.14.13: FindFirstFile C:UsersUser.minikubecacheimagesk8s.gcr.iok8s-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 的方法,如果这没有帮助,请提供有关您执行了哪些步骤导致此错误的更多信息。我不想猜测,但似乎您没有添加迷你库贝 二进制到您的路径:
executable file not found in %PATH%
- Preparing Kubernetes environment ...
首先,让我们删除当前安装的所有痕迹。 运行minikube delete
转到 C:\Users\current-user\ 并删除.kube
和.minikube
文件夹。
打开Powershell并安装巧克力,如下所述:
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 for Windows(假设你想这样做) - 你可以在我的回答中阅读更多。另一种可能性是在 Docker for Windows 中使用 Kubernetes,如此处所述 - 但在这种情况下您不会使用 minikube。
1-install chocolatey:
*单击开始并键入"电源外壳" *右键单击Windows Powershell,然后选择"以管理员身份运行" *将以下命令粘贴到Powershell中,然后按回车键。
- 设置-执行策略绕过 -范围进程 -force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) *关闭并重新打开提升的PowerShell窗口以开始使用巧克力 2-安装迷你库贝:
Choco Install Kubernetes-CLI
巧克力安装米尼库贝
迷你库贝开始
米尼库贝状态