Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insufficient memory / CPU? #567

Closed
aliakhtar opened this issue Sep 12, 2016 · 24 comments
Closed

Insufficient memory / CPU? #567

aliakhtar opened this issue Sep 12, 2016 · 24 comments

Comments

@aliakhtar
Copy link

aliakhtar commented Sep 12, 2016

My laptop has 60+ GB of ram, and a 4-core i7 cpu. But when I try to create a deployment using 1 cpu and 1Gi as the memory / cpu requests, I get told there's insufficient CPU and memory. What gives?

Ubuntu 16.04, virtualbox.

@dlorenc
Copy link
Contributor

dlorenc commented Sep 12, 2016

Hey,

The minikube VM is configured by default to only use 1gb of memory. You can pass more during minikube start with the --memory flag. Note that you'll need to stop/start minikube for this to take effect.

@aliakhtar
Copy link
Author

aliakhtar commented Sep 12, 2016 via email

@dlorenc
Copy link
Contributor

dlorenc commented Sep 12, 2016

Same thing, we start with 1 CPU by default. --cpus= will get you more.

@r2d4
Copy link
Contributor

r2d4 commented Sep 12, 2016

You can run minikube start -h to display this helptext

https://github.com/kubernetes/minikube/blob/master/docs/minikube_start.md

@r2d4 r2d4 closed this as completed Sep 13, 2016
@aliakhtar
Copy link
Author

I'm 'guessing' that the memory is is specified in Mb but it would be useful to have that listed more clearly in the help text

@giorgiosironi
Copy link

Running:

minikube stop && minikube start --cpus 4 --memory 8192

in Minikube v0.14.0 does not change the capacity of kubectl describe nodes, which stays at cpu: 2, the current default. Maybe there is something else to recreate too?

@uschmann
Copy link

uschmann commented Mar 3, 2017

minikube start --memory 4096
Does not increase the memory for my machine.

I am on a mac using virtualbox as a virtualisation-driver.

If i take a look in the virtualbox settings of the VM i can see that memory is still at 2gb.

Any idea?

@aaron-prindle
Copy link
Contributor

aaron-prindle commented Mar 3, 2017

@uschmann Was a minikube VM already running? If there is already a minikube VM running, the memory won't be changed as this is done on creation of the VM. You will have to run a minikube delete; minikube start --memory 4096 to have the increased memory. We have an issue tracking this here: #1147

@gsccheng
Copy link

@uschmann or to set as default you can do something like this and restart Minikube:
minikube config set memory <memory>

@easternbloc
Copy link

You do indeed have to delete before any edited config is reflected 😞

@dturanski
Copy link

On OS/X Virtualbox, I found the minikube memory setting was having no effect. I had to change it in VB.

@skhatri
Copy link

skhatri commented Jan 15, 2018

I did this on my mac

minikube stop
minikube delete
minikube --memory 8192 --cpus 2 start

@PavelSosin
Copy link

Finally, I had to delete entire minikube cluster to enlarge my minikube node to accommodate more Eclipse Che workspaces. Fortunately, it was only results of investigations but I spent few days to accumulate these results. Could you propose another way to manage minikube node size, even, via re-configuration of Oracle V-Box VM manually?

@losymear
Copy link

losymear commented Sep 6, 2018

If you are using VirtualBox, you can first change the momory for that vm , then reconfig and restart. Look at this.

@alecholmez
Copy link

alecholmez commented Nov 19, 2018

I used:

minikube config set memory 8192
minikube config set cpus 2

Seemed to persist my changes as well

@IvanBoyko
Copy link

Yes, it saves new values in config file:

$ cat ~/.minikube/config/config.json 
{
    "cpus": 4,
    "dashboard": true,
    "memory": 4096
}

@muratzorer
Copy link

muratzorer commented Apr 8, 2019

You dont have to delete minikube vm just to reconfigure some specs. Use the cli command of your hypervisor to reconfigure. For virtualbox:

$ minikube stop
$ VBoxManage modifyvm "minikube" --cpus 4 --memory 8196
$ minikube start --memory=8196 --cpus=4 --kubernetes-version=v1.13.0 \
    --vm-driver=virtualbox

Either way there is still a problem with minikube (v1.0.0), we cannot reconfigure --cpu for virtualbox (v5.2.24)

@duffytilleman
Copy link

If you're on a mac using the hyperkit driver, here's a workaround to change memory or cpu without deleting your vm:

minikube stop
edit $HOME/.minikube/machines/minikube/config.json, change "Driver.CPU" and/or "Driver.Memory"
minikube start

@nikkirs
Copy link

nikkirs commented Aug 8, 2020

This is due to insufficient RAM. Set RAM to 2gb.
minikube start --memory=2gb

@cglacet
Copy link

cglacet commented Oct 20, 2020

I confirm that the most simple method works on recent version:

❯ minikube delete
❯ minikube start --cpus 2 --memory 2048
😄  minikube v1.14.0 on Darwin 10.15.7
✨  Using the virtualbox driver based on user configuration
👍  Starting control plane node minikube in cluster minikube
🔥  Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...

Which is confirmed by VirtualBox GUI:

Screenshot 2020-10-20 at 13 36 47

@priyawadhwa
Copy link

Thanks @cglacet for sharing! If anyone else is seeing this, please open a new issue.

@XDavidT
Copy link

XDavidT commented Jul 4, 2021

I did this on my mac

minikube stop
minikube delete
minikube --memory 8192 --cpus 2 start

It's important to mark, when you delete a cluster, all your data will be erased.

@GregCKrause
Copy link

"max" value can also come in handy

minikube --memory max --cpus max start
# --memory='': Amount of RAM to allocate to Kubernetes (format: <number>[<unit>], where unit = b, k, m or g). Use "max" to use the maximum amount of memory.
# --cpus='2': Number of CPUs allocated to Kubernetes. Use "max" to use the maximum number of CPUs.

@EricoCartmanez
Copy link

EricoCartmanez commented Sep 7, 2021

"max" value can also come in handy

minikube --memory max --cpus max start
# --memory='': Amount of RAM to allocate to Kubernetes (format: <number>[<unit>], where unit = b, k, m or g). Use "max" to use the maximum amount of memory.
# --cpus='2': Number of CPUs allocated to Kubernetes. Use "max" to use the maximum number of CPUs.

Any ideas why I get that?..

Screenshot 2021-09-07 at 4 00 14 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests