Hi team :wave: I’m currently facing an issue with ...
# rancher-desktop
m
Hi team 👋 I’m currently facing an issue with Rancher Desktop — it’s stuck on “Waiting for Kubernetes API”. I’ve already tried restarting Rancher Desktop and my machine, but the problem persists. Has anyone encountered this before or knows any workaround to fix it?
w
Have you reviewed any of the logs from RD? Anything stand out?
e
I am running into the same problem on my machine and I cannot find a way around it. I am running K8S version 1.33.5 with Rancher Desktop 1.20.0 on Windows 11. It seems like the issue is something to do with a rancher-desktop context not existing as well as a config not being created in my .kube directory. The following is an error message I get in the console for most kubectl commands and what I suspect is the issue, though I am unsure how to resolve it:
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
w
what does
kubectl config current-context
look like? looks a bit like https://github.com/rancher-sandbox/rancher-desktop/issues/2722
e
@wide-mechanic-33041 it says that the current context is not set. And that github issue looks similar but the solution there does not fix my problem. I have deleted the .kube directory, uninstalled kubectl manually, factory reset rancher desktop, reinstalled rancher, manually installed kubectl, and it always results in the .kube having no config and the rancher desktop "Waiting for Kubernetes API"
w
Well that would have wiped out all the contexts. Did you do an RD reset after deleting them all to try and get a context back?
e
I have yes and still no luck, context is still not set and the tray just says "loaded-context"
w
yeah in my case i have a rancher-desktop context so question becomes why isn't that being created
anything jump out in the logs with issues or in the diagnostics view?
e
Nothing really aside from a bunch of messages about the context not being set and the original error about being unable to connect to the server at 8080. I do see this in the diagnostics
Error managing distribution Ubuntu: kubeconfig: C:\Windows\system32\wsl.exe exited with code 1
that may be related but I'm not sure
w
the 8080 i think is because there is no context on the host. maybe https://github.com/rancher-sandbox/rancher-desktop/issues/7997?
e
It seems like the issue ended up being that Rancher WAS creating a config but it was only doing so in WSL and when it went to run the kubernetes cluster, it was expecting it to be in the .kube directory on Windows. Not sure if Rancher was missing some function to copy that file over, but doing that manually allowed the kubectl commands to work and a context to be created. The Rancher Desktop app still says it is waiting for the Kubernetes API but the context is there and I can interact with it through the CLI so that is good enough for me as of now.
w
i wonder if the integration feature blocked the normal windows work that might have been done serially. if you have log entries you can always open a github issue. i would have expected the integration to happen after the host which is a bit interesting