Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minikuber volumes #1184

Closed
TristanCP opened this issue Feb 25, 2017 · 7 comments
Closed

Minikuber volumes #1184

TristanCP opened this issue Feb 25, 2017 · 7 comments
Labels
kind/support Categorizes issue or PR as a support question.

Comments

@TristanCP
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
FEATURE REQUEST

Minikube version (use minikube version): 0.16.0

Environment:

  • OS (e.g. from /etc/os-release): any OS

Minikube is supposed to make it simple to run Kubernetes locally, not only for "getting started" but also for "day-to-day development workflows".

source : https://github.com/kubernetes/minikube/blob/master/ROADMAP.md#goals

But I can also read that : "PersistentVolumes are mapped to a directory inside the minikube VM. The Minikube VM boots into a tmpfs, so most directories will not be persisted across reboots (minikube stop)"

source : https://kubernetes.io/docs/getting-started-guides/minikube/#persistent-volumes

So what if my developments need persistent storage (MySQL database, mongodb database, ...) ? Do I need to throw my Minikube and install directly the full Kubernetes ? Please tell me if I understand the documentation correctly.

Feature request :
To be able to use Minikube in day-2-day dev, I'd need to be able to persist data, logs and maybe conf between minikube reboots.

@r2d4
Copy link
Contributor

r2d4 commented Feb 25, 2017

There are some directories that are persisted and you can add your own by modifying the /usr/sbin/minikube-automount script in the VM.

https://github.com/kubernetes/minikube#persistent-volumes

@TristanCP
Copy link
Author

Ok, thanks, I guess you mean "persisted on host".

I think the doc you are refering to (the same I was refering to) needs some disambiguation though, because it says "PersistentVolumes are mapped to a directory inside the minikube VM" (not some of them, all of them), and then it shows a conf of a "PersistentVolume", saying it will "persist files" (inside minikube VM according to what is written above).

I translated the "However" like this : "Any persistence will be done inside minikube VM, however, here are the temporary persistence dir which can be used if u are still interested in this temporary persistence".

@r2d4
Copy link
Contributor

r2d4 commented Feb 25, 2017

I've reworded the readme to make a little more sense.

The host is the computer you're running minikube on. This is only exposed to the VM through the mounted host folders https://github.com/kubernetes/minikube#mounted-host-folders

The guest, or minikube VM, will persist certain folders to a disk stored on the host (something like ~/.minikube/machines/minikube/disk.vmdk). Files stored in certain directories in the minikube VM will persist between start/stops, but not deletes.

PTAL at the PR I've sent and let me know if that is clearer.

@TristanCP
Copy link
Author

TristanCP commented Feb 25, 2017

I've read your PR, but the problem here is "persist" can mean 2 things since you have 2 levels of virtualization :

  • "persist on MK VM out of containers"
  • "persist on host out of MK VM"

And the same ambiguity exists each time you use the word "mount" or even "host".

At this point (I'm just reading all the docs I can find on Kubernetes/Minikube, no practice yet) I don't even know if my docker containers will run on my host or inside the Minikube VM when I do "Kubectl run" on my host. If Minikube VM is running my containers inside the VM (with great loss of performance) instead of just monitoring/orchestrating them, I guess this product is not what I needed for a real life test.

@r2d4 r2d4 added the kind/support Categorizes issue or PR as a support question. label Feb 26, 2017
@TristanCP
Copy link
Author

After reading a few more docs like this one : https://docs.docker.com/machine/overview/, what I understand is there is not so much ambiguity (host/VM) since EVERYTHING takes place in the VM except when explained otherwise explicitly. In the examples and tutorials, the "kubectl" command and even the "docker" command are only sending requests to the VM, never to the host where they are installed.

I'm not sure how you can really test Kubernetes main features like "scaling", "management", "storage orchestration", ... inside a VM, but anyway, your doc could really use the same vocabulary explanations and diagrams which can be found here : https://docs.docker.com/machine/overview/

@r2d4
Copy link
Contributor

r2d4 commented Feb 27, 2017

We gladly accept PRs for better documentation

@r2d4 r2d4 closed this as completed Feb 27, 2017
@TristanCP
Copy link
Author

Well if there is a plan to make Minikube work without downloading a VM and doing everything inside, I'll be glad to contribute to the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

No branches or pull requests

2 participants