-
Notifications
You must be signed in to change notification settings - Fork 306
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 via Kubernetes fails to connect remoteContainers [resolved] #7108
Comments
@Jackbennett Maybe @MurzNN You need the Remote-Containers extension to get that context menu entry. It won't work though when the Kubernetes extension is running remotely as part of Remote-SSH due to #6054. |
I have the Remote-Containers extension installed (v0.245.2) together with Remote-SSH (v0.84.0). So my problem seems exactly related to #6054 - thanks for clarification! |
Hey @chrmarti, this issue might need further attention. @Jackbennett, you can help us out by closing this issue if the problem no longer exists, or adding more information. |
Yeh I guess it's closable, I don't think there's an action to resolve. Maybe warning if the resolved profile config is a known system path anyway? I don't think code was running as admin so wouldn't expect userprofile to actually be something in system32. I'm not sure how to detect vscode and kubectl getting different configs, probably a good amount of time it's intentional. |
Steps to Reproduce:
KUBECONFIG %userprofile%\.kube\config
Results in
KUBECONFIG C:\WINDOWS\system32\config\systemprofile\.kube\config
Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: n/a
checking
ls Env:
finds expected ENV variables with my username. Only KUBECONFIG has the system32 path.Fix
Remove
KUBECONFIG
key from System Env. User env is untested, just revert to letting kubectl search default paths itself.I don't know how vscode launches its terminal to end up with
%userprofile%
in system32 but I think having the system env kubeconfig a user err on my part lingering from long ago. This issue is reported in case someone else has the same odd error where you can browse the cluster but can't attach code to connect to pods, getting a terminal works.Secondary, invisible config
It seems
vs-kubernetes.kubeconfig
isn't used by "attach visual studio code" to container OR it's overwritten by an ENV when ran, which isn't used when browsing the cluster in the sidebar UI.Command palette: "Configure kuberenetes" sets these keys which aren't visible in the Settings UI viewing
@ext:ms-kubernetes-tools.vscode-kubernetes-tools
Searching "kubeconfig" has no settings found at all. Maybe this key is ignored as that's a default path anyway and that's a red herring.
The text was updated successfully, but these errors were encountered: