I want to start minikube to learn Kubernetes but am having trouble because of error RSRC_INSUFFICIENT_CORES
.
My mac has 2 CPU cores and minikube docs say that 2 cores are required.
Here a the machine specs from "About this Mac":
This machine has VirtualBox Version 5.2.35 r135669 but its not running, and working docker and docker-machine, as shown here:
✗ docker-machine --version
docker-machine version 0.16.1, build
✗ docker --version
Docker version 17.05.0-ce, build 89658be
I have successfully installed minikube v1.25.1 using an updated version of MacPorts, as shown here:
✗ which minikube
/opt/local/bin/minikube
✗ minikube version
minikube version: v1.25.1
I cannot start minikube and get error: Exiting due to RSRC_INSUFFICIENT_CORES
. Here is the output that I see from 2 different minikube start
attempts:
✗ minikube start --cpus=2
😄 minikube v1.25.1 on Darwin 10.11.6
✨ Automatically selected the docker driver. Other choices: virtualbox, ssh
- Ensure your docker daemon has access to enough CPU/memory resources.
- Docs https://docs.docker.com/docker-for-mac/#resources
⛔ Exiting due to RSRC_INSUFFICIENT_CORES: Requested cpu count 2 is greater than the available cpus of 1
✗ minikube start --cpus=1
😄 minikube v1.25.1 on Darwin 10.11.6
✨ Automatically selected the docker driver. Other choices: virtualbox, ssh
⛔ Exiting due to RSRC_INSUFFICIENT_CORES: Requested cpu count 1 is less than the minimum allowed of 2
Please excuse newbie-ness--this is my first ever SO question!
Is it impossible to start minikube on this Mac?
I ran into these errors on an M1 Mac because my podman (4.0.2) did not have the VM configured with enough capacity. Abhinav Sonkar figured out how to fix this. This builds on his trail blazing.
First you may need to get rid of your existing VM in podman:
podman machine stop
podman machine rm
Then recreate it with adequate specs and tweak the connections to work around another issue:
podman machine init --cpus 6 --memory 12288 --disk-size 50
podman machine start
podman system connection default podman-machine-default-root
After that I was able to install minikube from brew
and start it with:
minikube start --driver=podman --container-runtime=cri-o
With that the minikube
subcommands work and kubectl
seems fine talking to it. I've also gotten minikube start
to work with --kubernetes-version=v1.23.5
, v1.22.5
, v1.22.8
and v1.23.2
.
To enforce operation on a single core, you can use the following options
--extra-config=kubeadm.ignore-preflight-errors=NumCPU --force --cpus=1
Please note that docker and minikube
were designed to run on at least two cores. If available, please consider enabling hyperthreading.