Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages
Servers, nginx and Docker

minikube start stops before creating the cluster because of its CPU check

Your error

Exiting due to RSRC_INSUFFICIENT_CORES: Docker has less than 2 CPUs available, but Kubernetes requires at least 2 to be available3 more lines it can show

Fix it fast

Most common cause, 1 of 3

The container engine or VM offers fewer than 2 CPUs

Raise the CPU count where the limit lives: Settings > Resources > Advanced > CPU limit in Docker Desktop (macOS, Linux, Hyper-V backend), processors in the [wsl2] section of .wslconfig for the WSL 2 backend, or a VM size with at least 2 vCPUs in the cloud.

Fix
# %UserProfile%\.wslconfig, WSL 2 backend only
[wsl2]
processors=4

wsl --shutdown
minikube start
Did this fix it?
Full steps for this cause: check, fix, verify

Short answer

"Exiting due to RSRC_INSUFFICIENT_CORES" means minikube's CPU check failed before any cluster was built: the driver offers fewer than 2 CPUs, the cpus setting is below 2, or it asks for more CPUs than the driver has. The text after the code says which. Give Docker or the VM 2 or more CPUs, or set --cpus to fit (minikube 1.39).

  • Applies to minikube 1.39, Kubernetes 1.37 (minikube default), Docker Engine 29, Docker Desktop 4.x
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Which cause do you have?

Compare what minikube is told to request with what the driver can give. With the docker or podman driver, minikube takes the CPU count from the container engine's info, not from the laptop, so a 10-core machine can still fail when the engine sees one CPU.

Run this first
minikube config view
docker info | grep -E 'CPUs|Total Memory'
# VM drivers count the host: nproc (Linux) or sysctl -n hw.ncpu (macOS)

Then find the line you see in this list and open its fix:

  1. 1The container engine or VM offers fewer than 2 CPUs'... has less than 2 CPUs available, but Kubernetes requires at least 2 to be available', and docker info prints CPUs: 1
  2. 2The cpus setting asks for fewer than 2 CPUs'Requested cpu count 1 is less than the minimum allowed of 2', and minikube config view shows cpus: 1 or the command used --cpus=1
  3. 3The request is larger than what the driver has'Requested cpu count 4 is greater than the available cpus of 2', sometimes with the hint to ensure the docker daemon has access to enough CPU/memory resources

What does the error look like?

  • Exiting due to RSRC_INSUFFICIENT_CORES: Docker has less than 2 CPUs available, but Kubernetes requires at least 2 to be available
  • Exiting due to RSRC_INSUFFICIENT_CORES: Requested cpu count 1 is less than the minimum allowed of 2
  • Exiting due to RSRC_INSUFFICIENT_CORES: Requested cpu count 4 is greater than the available cpus of 2
  • Exiting due to RSRC_DOCKER_CORES: Docker Desktop has less than 2 CPUs configured, but Kubernetes requires at least 2 to be available

Cause 1 of 3

The container engine or VM offers fewer than 2 CPUs

You see'... has less than 2 CPUs available, but Kubernetes requires at least 2 to be available', and docker info prints CPUs: 1

Check

minikube exits with RSRC_INSUFFICIENT_CORES when the driver reports fewer than 2 CPUs, the minimum it enforces for Kubernetes. A cloud VM with one vCPU, a WSL 2 VM capped by processors=1 in .wslconfig, or a Docker Desktop VM with its CPU limit at 1 all fail here. With Docker Desktop on macOS or Windows the same check reports RSRC_DOCKER_CORES instead, and its advice is to raise the CPUs setting under Resources.

Check
docker info | grep CPUs
Get-Content "$env:USERPROFILE\.wslconfig"   # PowerShell, WSL 2 backend

Fix

Raise the CPU count where the limit lives: Settings > Resources > Advanced > CPU limit in Docker Desktop (macOS, Linux, Hyper-V backend), processors in the [wsl2] section of .wslconfig for the WSL 2 backend, or a VM size with at least 2 vCPUs in the cloud. Then start again.

Fix
# %UserProfile%\.wslconfig, WSL 2 backend only
[wsl2]
processors=4

wsl --shutdown
minikube start

Verify

The engine now reports 2 or more CPUs and the node comes up.

Verify
docker info | grep CPUs
minikube status

Confirmed by github.com

Did this fix it?

Cause 2 of 3

The cpus setting asks for fewer than 2 CPUs

You see'Requested cpu count 1 is less than the minimum allowed of 2', and minikube config view shows cpus: 1 or the command used --cpus=1

Check

The same code appears when the request is below the minimum even though the machine has CPUs to spare. A value stored once with minikube config set cpus is reused by every later start until it is removed, so the flag is easy to forget.

Check
minikube config get cpus

Fix

Remove the saved value so the default of 2 applies, or set 2 or more. A cluster that already exists keeps its CPU count, and minikube warns that you cannot change the CPUs for an existing cluster, so delete it before starting with the new value.

Fix
minikube config unset cpus
minikube delete
minikube start --cpus=2

Verify

The node inside the cluster sees the CPUs you asked for.

Verify
minikube ssh -- nproc

Confirmed by github.com

Did this fix it?

Cause 3 of 3

The request is larger than what the driver has

You see'Requested cpu count 4 is greater than the available cpus of 2', sometimes with the hint to ensure the docker daemon has access to enough CPU/memory resources

Check

minikube also stops when --cpus or the saved cpus value is higher than the count the engine or host reports. This shows up when a team script asks for 4 or 6 CPUs and runs on a smaller laptop or CI runner.

Check
minikube config get cpus
docker info | grep CPUs

Fix

Ask for no more than the driver offers. --cpus=max requests everything available; with the docker or podman driver, --cpus=no-limit sets no CPU limit on the node container at all.

Fix
minikube delete
minikube start --cpus=max

Verify

minikube starts, and nproc inside the node matches the driver's count.

Verify
minikube ssh -- nproc

Confirmed by github.com

Did this fix it?

How do I stop it coming back?

  • Keep cpus out of minikube's saved config on shared machines and pass --cpus in the script that starts the cluster, so the request is visible.
  • Give CI runners that start minikube at least 2 vCPUs, the requirement listed on minikube's start page.
  • Use --cpus=max in team scripts instead of a fixed number that fails on smaller laptops.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine on the same stack: Dispatch Pro, TaxiDex.

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.