-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
WSL2: Unable to connect to cluster with kubectl #3094
Comments
Also facing the same issue on kind v0.17.0 on Ubuntu WSL with I tried |
Can either of your confirm what iptables is in use on the linux VM? |
Sorry, #3054 is for the other direction, node to host. For host to node, if api-server is indeed listening (which seems likely, given the pod is healthy and reachable within the nodes), this is probably a problem with docker. If you can exec into the linux host, you can check if the api server is reachable within the node, and we'll know if it's host => WSL2 at issue. I don't develop on windows and we do not have windows CI #1529, so I'll need your help pursuing those possibilities. |
Here's the output of
|
I wonder if it's a problem with the server URL. In the Docker container for the control plane, the server in |
I found that this issue is a bug with WSL and downgrading from WSL v1.1.2 to v1.0.3 fixes it. |
Thanks for confirming!! 🙏 |
I still have this issue even after downgrading WSL to v1.0.3 |
The current recommendation is to upgrade to the latest pre-release #3180 |
no that's expected. 127.0.0.1:$random_port is a port forward from the host to the api-server. Which isn't usable inside the containers because loopback addresses are network namespace local |
What happened: After running
wsl --update
I am unable to access my kind clusters with any kubectl command. When I runkubectl get pods
for example, I get the following output:I also see the following Docker containers:
However, if I run
docker exec -it kind-control-plane bash
, I can get the kubectl commands working within there and I see that the pods are running.How to reproduce it (as minimally and precisely as possible): Create a kind cluster and try to access it with kubectl:
Anything else we need to know?:
Environment:
kind version
): v0.17.0docker info
orpodman info
):/etc/os-release
): Arch on WSLkubectl version
): 1.25.4The text was updated successfully, but these errors were encountered: