Eduardo Sanchez-Ros
Eduardo Sanchez-Ros

Reputation: 1827

Is it possible to mount multiple volumes when starting minikube?

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.

Upvotes: 5

Views: 3807

Answers (3)

devansvd
devansvd

Reputation: 1019

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 !

Upvotes: 2

Dmitry Kirilyuk
Dmitry Kirilyuk

Reputation: 69

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

Upvotes: -1

Prafull Ladha
Prafull Ladha

Reputation: 13459

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 .

Upvotes: 6

Related Questions