bot*_*elp 18 macports docker kubernetes osx-elcapitan minikube
我想启动 minikube 来学习 Kubernetes,但由于错误而遇到麻烦RSRC_INSUFFICIENT_CORES。\n我的 mac 有 2 个 CPU 核心,minikube 文档说需要 2 个核心。\n以下是“关于此 Mac”中的机器规格:
这台机器有 VirtualBox 版本 5.2.35 r135669,但它没有运行,并且 docker 和 docker-machine 正在工作,如下所示:
\n\xe2\x9c\x97 docker-machine --version\ndocker-machine version 0.16.1, build \n\n\xe2\x9c\x97 docker --version\nDocker version 17.05.0-ce, build 89658be\nRun Code Online (Sandbox Code Playgroud)\n我已经使用更新版本的 MacPorts 成功安装了 minikube v1.25.1,如下所示:
\n\xe2\x9c\x97 which minikube \n/opt/local/bin/minikube\n\n\xe2\x9c\x97 minikube version\n\nminikube version: v1.25.1\nRun Code Online (Sandbox Code Playgroud)\n我无法启动 minikube 并收到错误:Exiting due to RSRC_INSUFFICIENT_CORES。这是我从两次不同尝试中看到的输出minikube start:
\xe2\x9c\x97 minikube start --cpus=2\n\n minikube v1.25.1 on Darwin 10.11.6\n\xe2\x9c\xa8 Automatically selected the docker driver. Other choices: virtualbox, ssh\n- Ensure your docker daemon has access to enough CPU/memory resources.\n- Docs https://docs.docker.com/docker-for-mac/#resources\n\n\xe2\x9b\x94 Exiting due to RSRC_INSUFFICIENT_CORES: Requested cpu count 2 is greater than the available cpus of 1\n\n\xe2\x9c\x97 minikube start --cpus=1\n\n minikube v1.25.1 on Darwin 10.11.6\n\xe2\x9c\xa8 Automatically selected the docker driver. Other choices: virtualbox, ssh\n\n\xe2\x9b\x94 Exiting due to RSRC_INSUFFICIENT_CORES: Requested cpu count 1 is less than the minimum allowed of 2\nRun Code Online (Sandbox Code Playgroud)\n请原谅新手——这是我第一次提出这样的问题!
\n这台 Mac 上是否无法启动 minikube?
\nchi*_*cks 30
我在 M1 Mac 上遇到这些错误,因为我的 podman (4.0.2) 没有为虚拟机配置足够的容量。 Abhinav Sonkar找到了解决这个问题的方法。这是建立在他的开拓精神之上的。
首先,您可能需要删除podman 中现有的虚拟机:
podman machine stop
podman machine rm
Run Code Online (Sandbox Code Playgroud)
然后使用足够的规格重新创建它并调整连接以解决另一个问题:
podman machine init --cpus 6 --memory 12288 --disk-size 50
podman machine start
podman system connection default podman-machine-default-root
Run Code Online (Sandbox Code Playgroud)
之后我就可以安装 minikubebrew并启动它:
minikube start --driver=podman --container-runtime=cri-o
Run Code Online (Sandbox Code Playgroud)
这样子minikube命令就可以工作了,并且kubectl与它交谈似乎很好。我还开始与、、和 一起minikube start工作。--kubernetes-version=v1.23.5v1.22.5v1.22.8v1.23.2
小智 12
要在单核上强制执行操作,您可以使用以下选项
--extra-config=kubeadm.ignore-preflight-errors=NumCPU --force --cpus=1
请注意,docker 和minikube被设计为在至少两个内核上运行。如果可用,请考虑启用超线程。
| 归档时间: |
|
| 查看次数: |
17141 次 |
| 最近记录: |