1

I've been having loads of issues with kubectl not having enough space. How can I increase the default storage size allocated to docker?

None of minikube recommendations worked.

1. Run "docker system prune" to remove unused Docker data (optionally with "-a")
2. Increase the storage allocated to Docker for Desktop by clicking on:
   Docker icon > Preferences > Resources > Disk Image Size
3. Run "minikube ssh -- docker system prune" if using the Docker container runtime

And the second is not possible from command line...

Caterina
  • 775
  • 9
  • 26

1 Answers1

3

Taking your comment into consideration

I get ImagePullBackOff when I try to deploy nginx on the cluster – Caterina

You can specify minikube's disk allocations separately:

minikube start --memory=8192 --cpus=4 --disk-size=50g

Which can help you to work around the disk space issues as the default is significantly smaller: --disk-size string Disk size allocated to the minikube VM (format: <number>[<unit>], where unit = b, k, m or g). (default "20000mb")

Rick Rackow
  • 1,490
  • 8
  • 19
  • I'm on Linux, spefically Ubuntu, not MacOS, and yes I'm already giving 14Gb to minikube. I ran `minikube config set disk-size 14000` prior to starting the cluster. – Caterina Feb 22 '22 at 13:23
  • That is less than the default – Rick Rackow Feb 22 '22 at 13:24
  • Which one is the default? Why does it take so much space? My VM is only 32 Gb – Caterina Feb 22 '22 at 13:25
  • > --disk-size string Disk size allocated to the minikube VM (format: [], where unit = b, k, m or g). (default "20000mb") [https://minikube.sigs.k8s.io/docs/commands/start/](https://minikube.sigs.k8s.io/docs/commands/start/) – Rick Rackow Feb 22 '22 at 13:27
  • Thanks Rich I changed my VM disk space to 100 Gb and I didn't get the error message again. But could you please let me know what is taking so much disk-space? I just instantiated 3 nodes and deployed nginx on them. – Caterina Feb 22 '22 at 13:48
  • if you do `minikube ssh` you can look around like on a regular box to see what's using a lot. eg `docker image ls` and `docker ps -a` – Rick Rackow Feb 22 '22 at 14:08