Is it possible to mount multiple volumes when starting minikube?

1/10/2019

I tried this but didn't work:

minikube start --vm-driver=hyperkit --memory 8192 --mount \
               --mount-string /home/user/app1:/minikube-host/app1 \
               --mount-string /home/user/app2:/minikube-host/app2

but only /home/user/app2 was mounted.

-- Eduardo Sanchez-Ros
kubernetes
minikube

3 Answers

2/27/2019

Currently there is no way. Even using "minikube mount" you need to run each command in separate terminal, what is completely unusable

-- Dmitry Kirilyuk
Source: StackOverflow

1/10/2019

You can run multiple mount commands after starting your minikube to mount the different folders:

minikube mount /home/user/app1:/minikube-host/app1
minikube mount /home/user/app2:/minikube-host/app2

This will mount multiple folders in minikube .

-- Prafull Ladha
Source: StackOverflow

5/28/2019

There is no need for multiple volumes when starting in your case.

Also, minikube mount after start needs a terminal in running state(opened always).

You can mount /home/user -> /minikube-host. All the folders inside /home/user will be inside VM at /minikube-host.

  • /home/user/app1 will be available inside VM as /minikube-host/app1
  • /home/user/app2 will be available inside VM as /minikube-host/app2

    minikube start --vm-driver=hyperkit --memory 8192 --mount \ --mount-string /home/user:/minikube-host

Hope this helps !

-- devansvd
Source: StackOverflow