Reputation: 183
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?
Upvotes: 18
Views: 20917
Reputation: 1
If you are a window user and using putty or moboxterm for ubuntu terminal.. while creating EC2 instanse please make sure of selecting t2 medium instead of t2 micro after that install docker,kubectl and minikube..Now start the minikube it will work
Upvotes: 0
Reputation: 7586
I had the error on macOS because I had configured Docker Desktop to use only one CPU. I put 2 and the error was gone.
Upvotes: 7
Reputation: 3855
I had the same issue. And I could resolve it using suggestion in this page.
--extra-config=kubeadm.ignore-preflight-errors=NumCPU --force --cpus=1
works however it is not ideal because minikube could use more cpus.
Antoher solution that was suggested here is to go to Docker->settings...->resources then change the number of CPUs available to Docker to a minimum of 2. Make sure you have enough Memory and Storage as well. then press the "Apply and Restart"
This is all good but it won't have an effect on the minikube that have already been created with little resources in you used the --force option from before.
In order to fix that issue use:
minikube delete --all
then:
minikube start --driver=docker
Now minikube will use the resources you made available to docker...
Upvotes: 0
Reputation: 1
I had the error on my windows and can bypass the CPU check using:
minikube start --extra-config=kubeadm.ignore-preflight-errors=NumCPU --force --cpus 1
On Linux use:
sudo minikube start --driver=podman --extra-config=kubeadm.ignore-preflight-errors=NumCPU
Upvotes: 0
Reputation: 2463
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
.
Upvotes: 30
Reputation: 163
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.
Upvotes: 13