Minikube: start should support --mount-string argument

Created on 12 Nov 2018  路  16Comments  路  Source: kubernetes/minikube

FEATURE REQUEST

Environment:

Minikube version: v0.30.0

  • OS: MacOS Darwin Kernel Version 18.2.0
  • VM Driver: hyperkit
  • ISO version: minikube-v0.30.0.iso

We have a well scripted process for spinning up our stack, currently it uses NFS shares.
We are looking to refactor this to use the minikube start --mount --mount-string "/blah:/blah"

We are struggling to get write access to the mount-point via this method.

We have tested with minikube mount with the --9p-version=9p2000.L and this gives us write access.

During minikube start we would like to make use of the --9p-version flag as per the minikube mount.

seems some similar discussion was taking place on this issue: #2290

aremount good first issue help wanted kinfeature lifecyclfrozen prioritbacklog 2019q2

Most helpful comment

In version 0.35 is see log
- Creating mount C:\\Users\\myhome\\IdeaProjects\\bigkube\\target\\scala-2.11:/data/jars ...
but when i use minikube ssh;ls /data/jars i get no such folder.
thats same issue? or i do something wrong

All 16 comments

Hi,
Same here, any answer or workaround to get --9p-version=9p2000.L on minikube start?

yes pls!

In version 0.35 is see log
- Creating mount C:\\Users\\myhome\\IdeaProjects\\bigkube\\target\\scala-2.11:/data/jars ...
but when i use minikube ssh;ls /data/jars i get no such folder.
thats same issue? or i do something wrong

bump! this would be extremely useful, especially for the ephemeral minikube clusters i have to spin up for the apache spark k8s integration tests. the only way i can get the PV to mount correctly is with a separate minikube mount command after the cluster starts, and do some bash gymnastics to keep track of the PID so i can ensure that the mount is gone when the integration tests are done.

our build script looks kinda like this:

minikube --vm-driver=kvm2 start --memory 6000 --cpus 8
minikube mount ${WORKSPACE}/tmp:/tmp/spark-k8s-integration-tests --9p-version=9p2000.L --gid=0 --uid=185 &
MOUNT_PID=$(jobs -rp)

...tests run...

kill -9 $MOUNT_PID
minikube stop

being able to pass in the additional mount args (gid, 9p-version, etc) directly through the minikube start call would be great, awesome, superb and much, much less fragile than doing things this way.

@shaneknapp - Agreed. I'd happily review any PR which makes the above happen.

@shaneknapp - Agreed. I'd happily review any PR which makes the above happen.

I SEE WHAT YOU DID THERE!

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

/remove-lifecycle stale

@tstromberg interested to tackle this issue. Would you be able to point me in the right direction to start.

So far I can see that the mount command code is inside mount.go but at high level what does the new code required to do ?

Thanks

/assign

I'll just add our use case for traction I suppose as we need this fix urgently.
I'm running postgres on minikube, I don't want a fresh entity, I've took a ready data from production and wanna mount it to the postgres pod running on minikube - I'm able to do that !

Because the data is stored on my Mac and mounted into the pod, it has root:root on the data folder which is making it impossible for me do anything with it after mounting it, of course the postgres can't load it properly as well, I'd need to mount the folder with 999:999 or something like that.

Seems if the above issue is fixed, my issue will be fixed as well, in the meanwhile I'm looking for ways to bypass it as we're blocked :(

@nanikjava still interested in working on this?

@nanikjava still interested in working on this?

Going to unassign myself for now, as trying to work on another ticket.

/assign

I started working on this issue, but the folder is not getting mounted after running command - minikube start --mount --mount-string "~/test:/test" https://github.com/kubernetes/minikube/issues/2481#issuecomment-630099850

Any updates?

Was this page helpful?
0 / 5 - 0 ratings