0

I'm using minikube version 0.28.0 and files don't persist after a restart.

I ran into the problem after noticing my database data disappears after a restart (even though the pods, pv's, and pvc's say they've been up for days). I used minikube ssh to create some files and noticed those disappear, too.

FWIW - I ran minikube addons list to confirm that default-storageclass is enabled

Should I be using minikube --mount to mount my data to my dev machine's disk? How can I persist my pods' data?

1 Answer 1

1

According to the official documentation minikube persists the data stored in the following host directories that can be mapped inside the particular PV via hostPath volume type:

  • /data
  • /var/lib/minikube
  • /var/lib/docker

Hence, in order to mount some custom host folder inside minikube VM, keeping the relevant data to retain across cluster reboots, you can use minikube mount command:

minikube mount [flags] <source directory>:<target directory>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.