kubernetes - 在 windows 上安装 minikube
问题描述
我正在尝试minikube
在Windows上安装,但安装过程中出现如下错误:
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 二进制文件添加到您的 PATH 中:
executable file not found in %PATH%
- Preparing Kubernetes environment ...
首先让我们删除当前安装的所有痕迹。运行minikube delete
转到 C:\Users\current-user\ 并删除.kube
和.minikube
文件夹。
打开 Powershell 并安装 Chocolatey,如下所述:
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。
推荐阅读
- python - 多个集合的唯一元素
- javascript - 如何在重复的函数上运行 Promise?
- rust - 我在我的 Rust 程序中不断收到 ParseIntError { kind: InvalidDigit },我不知道为什么
- acumatica - 既然 GIScreenHelper 被标记为过时,我如何重定向到仪表板?
- visual-studio-code - 如何设置 VSCode 以运行和调试 KeystoneJS 应用程序
- python-3.x - 将列表转为键值字典 Python
- javascript - 是否可以仅将选择绑定到一个框?
- elasticsearch - 搜索文档在 ElasticSearch 的列表中至少包含一个单词
- handlebars.js - 从handlebars.js中的字符串中获取第一个字符
- reactjs - 如何在开发仪表板中减少 React js 中的路由数量?