kubernetesminikube

Minikube - how to increase ephemeral storage


I am trying to set up a copy of our app on my development machine using minikube. But I get an error showing up in minikube dashboard:

0/1 nodes are available: 1 Insufficient ephemeral-storage

Any ideas as to how I fix this?

The relevant part of the yaml configuration file looks like so:

    resources:
      requests:
        memory: 500Mi
        cpu: 1
        ephemeral-storage: 16Gi
      limits:
        memory: 4Gi
        cpu: 1
        ephemeral-storage: 32Gi 

I have tried assigning extra disk space at startup with the following but the error persists:

minikube start --disk-size 64g

Solution

  • The issue is that minikube can't resize the VM disk.

    Depending on the type Hypervisor driver (xhyve, virtualbox, hyper-v) and disk type (qcow2, sparse, raw, etc.) resizing the VM disk will be different. For example, for if you have:

    /Users/username/.minikube/machines/minikube/minikube.rawdisk
    

    You can do something like this:

    $ cd /Users/username/.minikube/machines/minikube
    $ mv minikube.rawdisk minikube.img
    $ hdiutil resize -size 64g minikube.img
    $ mv minikube.img minikube.rawdisk
    $ minikube start
    $ minikube ssh
    

    Then in the VM:

    $ sudo resize2fs /dev/vda1 # <-- or the disk of your VM
    

    Otherwise, if you don't care about the data in your VM:

    $ rm -rf ~/.minikube
    $ minikube start --disk-size 64g