-
Notifications
You must be signed in to change notification settings - Fork 262
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
Attach Visual Studio Code doesn't work if kubernetes setting is in WSL #5849
Comments
After copying .kube/config from WSL to Windows, it works. |
You can easily reproduce this problem by Rancher Desktop
|
I have run into this exact issue in Visual Studio Code 1.62.3 and Kubernetes extension 1.3.4 with Rancher Desktop 0.6.1 on Windows 11 build 22000.348 with WSL 0.50.2.0. My Right-clicking on the pod, and then selecting "terminal" does work (I get a shell on the container in the pod), but attach does not with the "No Pod name found" error. I would be grateful to hear of any workarounds. @mtsmfm did you make any progress with this? |
@cpbotha I've found
I can't find full list of valid params though, it'll be like this: I've released an extension to attach VSCode to pod quickly and easily. https://marketplace.visualstudio.com/items?itemName=mtsmfm.vscode-k8s-quick-attach Hopefully it helps. |
@chrmarti I got the same result. |
Got it, same cause as #4405. |
Still no fix to this? I'm still getting this same issue, and it prevents me from using Windows with WSL2 for my workstation. |
This depends on microsoft/vscode#111238. |
You need to install If you then copy your Verified in WSL (Ubuntu 22.04) with docker and minikube. |
@marklechtermann I tried these steps but it doesn't work - still says "No pod name found". Only workaround is attaching to K8 pods from outside of WSL in non-WSL VSCode. |
Still no fix to this? I'm still getting this same issue.. Thanks in advance for any answers |
@mtsmfm I am actually trying your extension and getting error also, just copying the config file to the Windows location still produces |
@fedorzh Make sure if you can open the editor with |
In my minikube in WSL environment I have same problem. @mtsmfm Simply copying kube config file as you said: does not work for me, since windows kubectl can not access client-certificate & client-key files. So i prefix But your extension 'k8s quick attach' raises errors:
Still, I can use 'Terminal' comand like @cpbotha . Following is the log when i run 'Attach Visual Studio Code' command from the menu, and VS Code raises
Interestingly enough, when i run 'Copy Name' command from the menu, It successfuly copy the right pod name. |
This is a pretty common workflow now that people want to avoid the Docker Desktop mess. It would be nice to see this get supported. |
Even if it shown on k8s sidebar, I get No Pod name found error.
The text was updated successfully, but these errors were encountered: