如何更改 docker 默认存储大小

How to change docker default storage size

我一直有很多问题 kubectl 不够 space。如何增加分配给 docker 的默认存储大小?

None 的 minikube 建议有效。

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

而第二个无法通过命令行...

考虑您的意见

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

您可以单独指定 minikube 的磁盘分配:

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

这可以帮助您解决磁盘 space 问题,因为默认值要小得多: --disk-size string Disk size allocated to the minikube VM (format: <number>[<unit>], where unit = b, k, m or g). (default "20000mb")