-
Notifications
You must be signed in to change notification settings - Fork 46
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
Support Docker Desktop for Linux (access from the host to the containers VM) #183
Comments
I have couple of initial questions/thoughts:
|
Interesting, it seems that docker desktop runs in a VM https://docs.docker.com/desktop/troubleshoot-and-support/faqs/linuxfaqs/#why-does-docker-desktop-for-linux-run-a-vm so we need to identify that is docker desktop and create the tunnel in the host, otherwise you should only be able to access the portmaps on the host , you can set the flag Can you give me some way to identify docker desktop from the host, the output of |
Ah! Docker desktop strikes again. I actually ran into the exact issue as @AyushGlitch during my setup for cloud-provider-kind albeit on a MacOS device running Docker Desktop. I ended up utilizing https://github.com/chipmk/docker-mac-net-connect to provide a Layer 3 connection from the host machine into the Docker VM. It sets up and manages a wireguard tunnel with IP routing of the VM's docker networks. It would be a bit kludgy but I posit we could do something similar in cloud-provider-kind in instances where it detects docker desktop. @aojea if you'd like i can provide |
we can detect mac from the GOOS environment variables, the problem is that when we are in linux seems we need to discriminate now between "normal linux" where containers are routable and "docker desktop linux" where containers are behind a VM and are not reachable |
I can't find a consistent way to figure out if is |
Consistent across all OSes or within Linux? Can |
Linux only that is the only platform that has "native" docker and desktop mode.
Yeah, we already do that in kind, but base on the output I only see a reference in the
|
Reading through their docs a bit and the page you linked would lead me to believe that they know in a stable fashion what version you are running on the server version string: "Server: Docker Engine - Community" vs "Server: Docker Desktop 4.31.0 (153195)" for example https://www.docker.com/blog/how-to-check-docker-version/#highlighter_867586 I'd imagine that'd be stable enough to key off of |
That's what I thought but I don't see that in your output pasted |
OS: Ubuntu 22
Processor: Inter i5 1135g7
Ubuntu Version
Kind Version
kind v0.27.0-alpha+3ab1dab1c81267 go1.23.4 linux/amd64
Docker Version
Docker version 27.0.3, build 7d4bcd8
I went through the following steps and the cloud-provider-kind provided an external IP Addr for the load balancer but wasn't able to access the load balancer with it.
Creating Kind Cluster
$ kind create cluster --config clustersConfig.yaml
Creating Load Balancer Deployment
$ kubectl apply -f loadBalancerDeply.yaml
Allowing load balancers access to control plane nodes
$ kubectl label node kind-control-plane node.kubernetes.io/exclude-from-external-load-balancers-
Staring cloud-provider-kind
$ cloud-provider-kind
Access Load Balancer (Not Working)
$ curl 172.22.0.5:80/hostname
Able to
curl
whenexec
into the kindccm-* containerDid I miss any of the steps ?
If not then, is there any setting that has to be changed or any permission that should be provided ?
The text was updated successfully, but these errors were encountered: