I would like to see if there are potential issues with disk size usage with Minikube.
As per my understanding, Minikube allocates 20GB of storage by default and I can control that via the disk size flag: minikube start --vm-driver=hyperkit --disk-size=40g
Further I can control the size a container can allocate via something like this:
spec:
containers:
- name: app
image: ...
resources:
requests:
ephemeral-storage: "2Gi"
limits:
ephemeral-storage: "4Gi"
So I could have a maximum of 20/4=5 of these containers running.
With this in mind how can I now check directly how much storage of those total 20GB is still available on Minikube and how much of the 4GB the container is using?
Also, in case any container fails due to using more storage, is there a command that shows after the fact if any of the containers in the cluster has failed due to running out of storage? Something akin to minikube events --show-failures out-of-storage
?
There are no minikube commands available for checking the disk utilization as of now according to this official github issue request, you either need to use some monitoring tools for checking the disk utilization of minikube vms and containers or you need to manually login to each vm or container for checking the disk utilizations. You can either use normal ssh or use minikube ssh as shown in this git comment.
If any pod or container failed because of an out of storage issue you can check the minikube logs or you can use the below kubernetes command for checking the reason due to which a pod exited with a failure status.