25

I am trying to determine the default CPU and memory allocation for Minikube (version > 1.0).

When running the following:

$ minikube config get memory && minikube config get cpu
Error: specified key could not be found in config

values are not returned unless explicitly set with the --cpus and --memory options.

2
  • It would also be minikube config get cpus, use minikube config options for a list of the correct names. Commented Nov 26, 2019 at 9:10
  • Though previously the default Minikube CPU and memory allocation was set to a reasonable default (see: Version 0.12.0 - 10/21/2016) if not specified, the CPUs and memory are calculated given the system information. For reference, see cmd/minikube/cmd/start.go. Commented Nov 29, 2022 at 16:00

5 Answers 5

27

The default memory limit is 2GB and the CPU limit is 2. You can see the current config with the following command:

Altogether;

~ ❯ minikube config view vm-driver
- cpus: 4
- memory: 16384

Each one;

~ ❯ minikube config get memory                                          ✘ INT
16384

~ ❯ minikube config get cpus
4

Also, you can set default CPU and memory before starting the minikube:

minikube config set cpus 4
minikube config set memory 16384

❗ Do not forget, if you have already a minikube cluster you need to delete the minikube by executing minikube delete command and then executing minikube start command.

Sign up to request clarification or add additional context in comments.

3 Comments

This answer is excellent. I just wanted to know the defaults, but this gave me all the info I needed, thank you for this!
This is useful, but doesn't answer to question how to get default memory limit. Both commands gives me no such information (just - driver: kvm2 and Error: specified key could not be found in config)
minikube config get memory Error: specified key could not be found in config
25

The default memory constant is 2048 (megabytes) as seen here.

This doesn't automatically change with the vm-driver.

Comments

12

Default Minikube cluster CPU is 2

Default Minikube cluster memory is 2048

minikube config get cpus
minikube config get memory

Note: cat ~/.minikube/config/config.json won't be displaying the details until you manually configure it

3 Comments

just use minikube config set cpus 4 minikube config set memory 8192 to set it
I get Error: specified key could not be found in config when running those commands
OK, so for me and apparently most everyone else recently, as evidenced by the upvotes, notes that this answer does not work in our case. I also get the error Error: specified key could not be found in config when issuing minikube config get memory on a functional Minikube cluster. I hope someone posts a working answer. It amazes me that I have had to hunt for hours just to figure out how to view the memory of a minikube cluster. Wow! So much for "simple and easy".
2

This probably only makes sense for OSX / windows users.

If you are running minikube on Virtualbox you can open Virtualbox, right click on minikube's image then close > power off. Once the VM is turned off you can then go in Settings > System and modify the default memory allocated to minikube (which seems to be 4GB).

Comments

1

if you are using vagrant to create your linux (Ubuntu) instance, default memory allocation to newly created linux instance would be around 1GB, but Minikube need minimum 2 GB to run.

simple hack is shut down your VM instance, go to settings and increase the memory size (3GB preferred - 1GB for OS 2GB for Minikube) and now try running your instance and Minikube start.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.