-
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
add documentation for WSL2 #7879
Comments
If you are on Docker for macOS or Docker for Windows, networking works a bit differently, as there is no direct IP connectivity to the container. On these platforms, Docker requires individual ports to be proxied through. See the |
Sorry, I should have specified I'm experimenting with WSL2 and installing I followed the steps in that I basically copied and pasted all of them and was still unable to get any kind of contact between the cluster and browser.
When I did the
The If I could get the examples to work, I could more than likely figure out how to apply this to my ingress controller for my actual application. |
I am facing this too |
@winhtaikaung Any luck on your end? If not, would love to hear from a dev or someone who knows how to get around this issue. |
Like stated above, this is different when running on Mac or Win - the IP is accessible on Linux... This is a Docker VM limitation, unfortunately. You might also want to try other minikube drivers ? https://docs.docker.com/docker-for-mac/networking/#known-limitations-use-cases-and-workarounds https://docs.docker.com/docker-for-windows/networking/#known-limitations-use-cases-and-workarounds |
There are no other To expand on "
Docker is running, by the way... so the error makes no sense. |
WSL (1 is container, 2 is vm) is a little like LXD, it will take more effort to get minikube working there. See #5392 for details. The error seems to be due to WSL2 not using systemd, can probably be worked around ? #6954 Sorry for missing "WSL" |
@eox-dev any luck with the above advice? |
@sharifelgamal Well, basically using EDIT: Got to play with this for a few hours today. Same issue as with Would be great if Microsoft would implement nested virtualization in WSL2 just so you can install |
@eox-dev we had a PR that added support for WSL |
@medyagh I gave it a shot, but still running into the same issue where the running application cannot be accessed from the browser.
It is usually When I deploy the Maybe, it is something I'm just not overlooking, but I have zero issues in macOS with At some point today I plan on going through this: https://kubernetes.io/blog/2020/05/21/wsl-docker-kubernetes-on-the-windows-desktop/. Maybe that will get me up and running with WSL. |
thank you for providing more context, seems like you found a bug ! is the port for ingress 80 ? |
Yes, using port 80 for local dev. |
for docker driver we will need to create a port on 80 during container creation time, this is do-able. this would be a good fit for v1.12.0 to make docker driver the default driver @eox-dev do you mind porviding me extact steps, steps by step so I make a PR to fix this? |
|
@Aut0R3V Hi, I never updated and sent a PR because I could never get it working. |
@cheslijones thanks for the reply. I also tried |
Is there any news on this topic? How to use localhost for nodeport, loadbalancer or ingress, when minikube, kubectl and docker are installed in WSL2, but there is no docker-desktop at all, or minikube as windows executable. Address is constantly 192.168.49.2, and can't be accessed from browser or postman(insomnia). |
@igortas This is what has been working for me. I've actually been using WSL2 for a few months or so for development, which I thought I'd never see the day that would happen. This is what I've been doing and tested on several installs:
That is my use case and that has worked for me on any computer I've tried it on. Kind of lame having The thing I like about this is the directions are basically the same whether using macOS, WSL2, or Windows, so it is easier to communicate. Doing this on Linux doesn't quite work the same due to Docker networking differently in Linux, but it sounds like it is being addressed: #10812. On Linux using the I'm just using the Beta Channel Windows, but it worked for me on the Relase Channel as well. No modifications whatsoever to WSL2 or the kernel, just a clean install of WSL2. I'm even running |
@cheslijones
For now minikube don't like to work if i set custom host in ingress, even I've tried to update Update: |
@cheslijones I agree it is kind of not ideal to have another terminal to use the loadbalancer feature, to avoid that you could use the minikube server command if you have a nodeport or hostport service you could list them with @igortas do you feel like we should a documentation page just for WSL2 on our website ? if yes would you be interested to add a section in docker driver for WSL2 ? |
Hi Medya,
Thank you for the pointer.
https://minikube.sigs.k8s.io/docs/drivers/docker/ looks very promising.
For WSL2 environments, it will be worth clarifying if Docker should be
installed on WSL2 guest or in Windows host.
Regards
Shankar
On 5/12/21 11:55 AM, Medya Ghazizadeh wrote:
@cheslijones <https://github.com/cheslijones>
thank you for sharing your interesting story of using minikube, I am
glad you got it working in WSL2,
||
I agree it is kind of not ideal to have another terminal to use the
loadbalancer feature, to avoid that you could use the minikube server
command
if you have a nodeport or hostport service you could list them with
|minikube service list|
and access then using minikube service svc_name
@igortas <https://github.com/igortas> do you feel like we should a
documentation page just for WSL2 on our website ? if yes would you be
interested to add a section in docker driver for WSL2 ?
https://minikube.sigs.k8s.io/docs/drivers/docker/
<https://minikube.sigs.k8s.io/docs/drivers/docker/>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#7879 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AISGH6PRJQK5VIHL6OBEYGLTNLFINANCNFSM4MPUXWPA>.
--
ForgeRock <https://www.forgerock.com/> *Shankar Raman*
Senior Technical Writer | ForgeRock
***@***.*** ***@***.***>
*web* www.forgerock.com <https://www.forgerock.com/>
…--
ForgeRock values your Privacy <https://www.forgerock.com/your-privacy>
|
@shankar-forgerock Install and configure everything inside WSL2. U don't need docker-desktop. @medyagh Looks like a good idea. Where we can continue to chat on this topic? |
Any news yet on whether this might be fixed with Windows 11? |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
Is the issue solved? I also use minikube on WSL, but I haven't faced this problem as of now. But I am also unable to go through the entire conversation, can someone summaries may be? |
Try: |
And we should have docker running in the background or else it won't work I guess |
Trying to use systemd where not available is probably a bug, though: #12276 (comment) |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
To get host applications such as Browser, IDE, Postman to connect to services/applications deployed in Minikube via Ingress,
|
Hi everyone, I'm new to open source contribution but worked with minikube using docker driver before. Is there still a need to add documention for this issue? |
Now install minikube in WSL it more simple you need install docker in wsl and follow linux guides |
minikube start --driver=docker
minikube ip
=172.17.0.2
How are you supposed to access the web app from a browser when the IP is
172.17.0.2
? Browser just spins for a while before saying it can't connect. Only occurs when--driver=docker
. Just about every other driver gives you an ip that is accessible from browser.The text was updated successfully, but these errors were encountered: