-
Notifications
You must be signed in to change notification settings - Fork 113
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
working kubeconfig doesn't load at all #812
Comments
(I've also tried this with Cloud SDK version 436.0.0) |
Could you try some of the potential mitigations listed here #791 If that doesn't work, unfortunately it seems there is not much we can do from the extension at this time, and you may need to use the CLI for your use case. |
Which ones? There's a lot of back and forth in there and I'm not sure which you're talking about. I don't have |
The main thing to try would be the steps outlined in #791 (comment) A couple other things you can try if that doesn't work: |
The autoDependencies being on and off didn't change anything (including doing a full wipe of
Turning off the TLS verification for all of my tools by editing a kube config instead of just this one feels very bad. Turning off TLS verification also doesn't seem to be required for the extension given that the Kubernetes extension ( (Their readme, for instance, says to only do the same cluster-wide thing if needed, but the kubernetes extension works fine with the same kube config Cloud Code has. And I know the kubernetes extension is using the same kube config because it saw the same renames I did above to test what kube config Cloud Code was looking at) |
So the deal seems to be that the k8s extension uses Could there be a compromise here? The node https library allows for setting a custom CA. Could Cloud Code use (I want to reiterate here I'm not using any fancy stuff in GKE. It's a plain cluster I've had for years.) |
Here's a kubectl command that lists out on each line the cluster name and its base64-encoded CA certificate:
I believe it would be a matter of parsing this stdout, mapping the cluster name to those values (while base64 decoding in node), and either listing them all on each |
Hm, I suppose y'all are already parsing the kubeconfig in node already though! So, if y'all are, it seems like the |
Thanks for helping investigate this! Yep, we use the node package instead of kubectl for this, which causes the discrepancy between the extensions. From what I can tell, we are setting the ca parameters on the request as per the kubeconfig value, but it might be getting lost somewhere along the way. We'll take a look at parsing the kubectl certificate and setting that on the response to see if it improves anything. |
@SKrupa Also having this same issue. Is there any update on a fix? |
Ok I have another idea of why this is happening looking more deeply into it. In Can you see if setting "Http: Proxy Support" to "off" gets things working for you? |
@j-windsor Setting this to |
No longer seems to exist in VS Code. Is there another setting we need to set? |
I have noticed that when the |
@ktarplee - Can you please provide the details about the platform you are using and the extension version ? Also I will assume that you are having the exact same issue since you re-opened it -- in that: If it's not - can you please provide more detail about the exact error in your specific case ? |
Yes, in my case
The RKE2 clusters uses a length two certificate chain for the k8s apiserver cert while kind clusters use a length one chain. Both use untrusted (by my system) self-signed certs as the root. I have seen this same problem on Linux and Mac OS X with the latest version of the extension and VS Code. |
Thanks for the additional info @ktarplee. Would you mind repro-ing this in your IDE and then in the same session filing a feedback report under the extension tab? |
Type: Bug
Attempting to click on the kubernetes cluster config (that works in the Kubernetes extension next door and from my normal shells) just gets the error:
Turning on "cloudcode.verboseLogging" and setting "cloudcode.cloudSdkVerbosityLevel" to "debug" adds nothing to the the Cloud Code logs.
The last lines are all things like
Running the command in that log line in a normal shell (with quotation marks around
value(account)
because zsh) correctly returns what's in the logs: my GCP account's email addressExtension version: 1.21.7
VS Code version: Code 1.79.2 (Universal) (695af097c7bd098fbf017ce3ac85e09bbc5dda06, 2023-06-14T08:58:52.392Z)
OS version: Darwin arm64 22.5.0
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: