-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
(meta) Make Windows/Hyper-V a first-class solution #5072
Comments
Being able to run minikube as a non-admin user on Windows is pretty important if you value enterprise adoption of minikube. Docker Desktop, for example, achieves this by running a privileged service that creates and destroys VMs when commanded by a non-privileged application launched by the user. |
@orthoxerox - Understood. I personally am not a fan of that model, as it subverts the more typical Hyper-V Administrators ACL: https://blogs.msdn.microsoft.com/virtual_pc_guy/2014/06/11/allowing-non-administrators-to-control-hyper-vupdated/ |
@tstromberg I think the idea was to allow the user to create and run just one VM, the only with MobyLinux on it. Making a user a Hyper-V admin allows them to create and run all possible VMs. |
I spent the last few days on automating the install and start/stop/delete of minikube on Windows 10 Pro with Hyper-V and went through a lot of problems. So here are the problems I faced and how I solved. I hope it will be useful.
So that's it for today. I'll post other findings if I still get problems. I definitely find there is a lack of documentation on minikube on Windows. But for now I am pretty happy with the dev environment on my laptop. It allows to automate the deployment, the debug and the test and all the team will have the same dev environment. Oh! I almost forgot about a bug in https://github.com/kubernetes/minikube/blob/master/cmd/minikube/cmd/start.go . The code below will delete your minikube VM because of any reason. That means that if for some reason you didn't have enough memory to start minikube VM, IT WILL GET DELETED 5 TIMES. Not only you wait 5 useless retry but also you lose everything you did in your minikube VM. I don't think the code below make any sense. 'minikube start' should never delete the VM. We should explicitly use 'minikube delete' if we ever think the solution is to delete the minikube VM.
|
Defaulting to internal switch like the other platforms would be very good. Some sites, like my org's capture unknown mac address dhcp requests and assign them temporary ip's and isolate traffic until they agree to some terms of service / register some additional information. Making it unsuitable for minikube. Internal switch with nat works fine though as the host is already registered. |
FYI If you would need to set a pre-defined mac address on the minikube VM this is the script to do it. It could be nice to have a feature in minikube to set that mac address automatically on 'minikube start ... --mac-address ....'. The following in Powershell works fine but is cumbersome because you need to start and stop and start again. And you need to redo it everytime the VM is deleted.
|
yes, but you still need a mechanism to get that mac address either preregistered with the network, or get a web browser in the vm long enough to do the registration, before minikube starts trying to fetch artefacts. Either way, not a great user experience. Defaulting to internal and making nat work out of the box like the other platforms would be seamless/much preferred. |
this is still on our roadmap ! |
Really interested in seeing progress for this. I've spent the whole day trying to make things work for my use case. I had trouble getting the Minikube VM to access internet (I suppose because I didn't do anything for ICS with the default switch?). I hoped everything would workd OOB but it didn't :) I ended up using an external vSwitch in Hyper-V which fixed that issue, but now my problem is that I can only access the VM ports when using minikube tunnel, through the unstable IP. The problem is that our setup within K8S uses an Nginx ingress which maps the "localhost" host to some web service, which of course does not work when the host header is set to... something else.. :) On Linux this setup works fine because I can setup port forwarding to the host using commands such as: I could work around this by forwarding the ports exposed by the Hyper-V VM using commands such as: This seems to work but of course remains fragile as the Minikube VM IP on my network is not stable and will be different for each developer (assuming an heterogeneous environment). For the moment I'm just re-executing those commands in my start script (right after I suppose I could indeed define a static Mac after the VM's creation and register that on my network but this feels flaky and tiresome, plus it puts too many expectations on things outside of my scripts control. I'm really hoping for something better/simpler :) |
Related: #6264 |
I think we should be able to close this once v1.9 is released, given the improvements to hyper-v deletion. The rest of the major issues seem sorted out. That is not to say that Windows support is completely bug-free or as well tested as other platforms, but that we should track those issues with a finer granularity. |
Closing because we've reached enough parity that we can now track this via individual issues. Thank you for your patience! |
Here are the issues to be resolved:
Hyper-V: Use the "Default Switch" (NAT based) by default - Hyper-V: Use the "Default Switch" (NAT based) by default #4079Hyper-V: Stable integration testing Hyper-V: Stable integration testing #3591Hyper-V: minikube mount fails with windows 10 default switch - Hyper-V: Stable integration testing #3591Please feel free to comment with any others that cause a large user experience gap for users of Windows + Hyper-V.
The text was updated successfully, but these errors were encountered: