0

I am using minikube on ubuntu and start with --driver=none. Since it is recommended to use kvm2(for linux host) and need to be root user with --driver=none, I am now switching to kvm2.

I have few kubernetes deployment using persistent volume and claims. When minikube started, it figures out to mount the host path to this volumes and running as expected.

Now in kvm2, these mounting is not working as it cannot find the host path. Is there any way to mount the host path to all the deployments automatically?

The idea is, to have central location say /data, as central persistent storage. Each deployment will have its own subfolder under /data. In the persistent storage, I will define the mountpath to use this subfolder. Is there any way to mount this host's /data folder to the pods automatically through configuration as one time setup? If there is any better way to achieve the persistent storage, please let me know.

Senthil
  • 323
  • 4
  • 15
  • I found this [minikube mount](https://minikube.sigs.k8s.io/docs/handbook/mount/) option has good support for virtual-box and for kvm not so – Senthil Jul 01 '20 at 15:44
  • You have specified the /data folder in minikube mount before? As far as I understand from [documentation](https://minikube.sigs.k8s.io/docs/handbook/persistent_volumes/) if you want to do it under /data folder minikube should be configured to persist files stored under the /data folder and you could create PersistentVolume to persist data in the ‘/data’ directory. What you mentioned in comments is about driver mounts, what about [9p mounts](https://minikube.sigs.k8s.io/docs/handbook/mount/#9p-mounts)? – Jakub Jul 02 '20 at 10:13
  • Thanks for the reply. I will try mounting the folder to minikube and update. – Senthil Jul 03 '20 at 02:08
  • Sure, let me know if that worked. – Jakub Jul 06 '20 at 06:41
  • I tried with 9p and still figuring out to to set the central `/data` store. Now I am thinking about switching to virtualbox, with expectation that virtualbox allows mounting much easier to do. – Senthil Jul 07 '20 at 13:56

0 Answers0