-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[RFE] Support multiple instances #886
Comments
Thanks for the request! I think this is a duplicate of #370, but you have much more of a writeup here so I'll close that one. |
I ran into this issue when looking for different minikube contexts. It's true multiple clusters is still a good FR and there's valid use cases for it, but worth nothing for some of those cases Namespaces are probaby good enough.
Now you are in the dev namespace and can have isolated Pods/Services etc in the same cluster. |
@waprin the main problem with one cluster with multiple namespaces is that you'll be using the resources defined in all the namespaces in the cluster. For development purposes you'll probably prefer to have multiple clusters, which are really fast to start/switch, and keep resource consumption (cpu/memory) to a minimum. |
@jorgemoralespou noted, agreed there are valid use cases for this (another one might be testing cluster federation stuff). Just wanted to note/remind that namespaces existed because I got redirected to this issue, when namespaces were really good enough for what I wanted. |
@aaron-prindle have you any plans on how this is going to look at? In Minishift we also have the feature request to support multiple VMs - minishift/minishift#126 |
@hferentschik It definitely would be great to align on our implementation. Right now the simplest way to do this would be to add a name parameter to minikube ( |
Honestly, my only issue with this is now every command needs a qualified machine name. We already support the If not, we might want to use something like
|
I liked the idea of @r2d4 for
👍 |
+1, this is a quite big change from a ux experience. It would confuse users if they would have to deal with different approaches.
+1 Right, that would take care of how to create an instance with a given name.
I think I have the same ideas here as @r2d4. Why not writing the name of the instance you started into the config (transparently). Then all commands executed are against this instance. A bit like you can switch context with kubectl or oc. I think we should, however, have a dedicated Also, I think it might still make sense to have the '--name' option on a global flag name as well. Without specifying anything the command runs against the currently selected instance, but one can also run a once off command against another instance using
+1 That would be my preference. Even though it might be a bit harder. With this approach will also have to deal with moving some parts around in the MINIKUBE_HOME directory. Atm, the libmachine VMs are already in their own namespace - ~/.minikube/machines/minikube. It is just that we have only a single VM and we use a hard coded constant for that. If this became configurable, then the VMs are alreday separated. However, one also needs to take care of teh config and log directory in ~/.minikube/. They need to be scoped per instance as well. So it's quite a bit of refactoring required here :-( |
Closing. This functionality was added in #1320 and will be available in the next minikube release. Example use can be seen here: #1320 (comment) |
I can't seem to be able to use it on Windows with hyperv. In order to start the second minikube I have to first stop the first one. Otherwise I get errors like this:
|
@aaron-prindle v0.20.0 include this feature?
|
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
FEATURE REQUEST
As a developer I work on many different projects and I have a need to easily switch context from one to the other. Using minikube/minishift is great for testing on top of kubernetes/openshift but does not allow for this context switching.
I'm here requesting that minikube could support multiple instances so I can start/stop different instances depending on the scope of work I'm doing. Also, even the cost of initialization is not too high (with good internet connection), every startup pulls down some containers to work with.
Also, it usually happens that different projects might have different configurations, or applications deployed, and I want to start a minikube instance with just the projects I need (or those that are related to the work I'm doing).
The request would introduce a profile (name not relevant) name to the start process, so that I can have few named machines. If no profile specified, applying default profile.
minikube start # starting default minikube
minikube stop
minikube start project_a
minikube stop
minikube start k8s-1.5-test --config .... # Configuration applied to the VM
minikube stop
minikube start k8s-1.5-test # Configuration already applied, no need to reconfigure
minikube status # Log Active cluster: k8s-1.5-test
minikube stop
minikube delete k8s-1.5-test
minikube list # List of profiles
This is very convenient for developers that tend to switch context very often, but also for many other use cases.
I did a writeup some time back (for a different tool) but the goals are somehow defined there.
http://jorgemoral.es/2016/10/developing-locally-with-openshift/
cc/ @jimmidyson
The text was updated successfully, but these errors were encountered: