GoogleCloudPlatform / cloud-code-vscode

Cloud Code for Visual Studio Code: Issues, Documentation and more
Other
415 stars 111 forks source link

Error initializing on Linux #879

Open Ortega-Dan opened 8 months ago

Ortega-Dan commented 8 months ago

Not able to access Minikube:

image

Latest Cloud-code version: 2.3.0 image

Verbose logs: but looks like the specific failure in this log is: [Error]: nodes is forbidden: User "system:anonymous" cannot list resource "nodes" in API group "" at the cluster scope

[2/1/2024, 1:21:57 PM] Running 'kubectl version --client --output json --request-timeout 5s' (unmanaged)
[2/1/2024, 1:21:57 PM] {
  "clientVersion": {
    "major": "1",
    "minor": "28",
    "gitVersion": "v1.28.5",
    "gitCommit": "506050d61cf291218dfbd41ac93913945c9aa0da",
    "gitTreeState": "clean",
    "buildDate": "2023-12-21T02:16:47Z",
    "goVersion": "go1.20.12",
    "compiler": "gc",
    "platform": "linux/amd64"
  },
  "kustomizeVersion": "v5.0.4-0.20230601165947-6ce0bf390ce3"
}

[2/1/2024, 1:21:57 PM] 'kubectl version --client --output json --request-timeout 5s' exited with code 0 took 74ms (unmanaged)
[2/1/2024, 1:21:57 PM] Running 'skaffold version' (unmanaged)
[2/1/2024, 1:21:57 PM] v2.6.0

[2/1/2024, 1:21:57 PM] 'skaffold version' exited with code 0 took 41ms (unmanaged)
[2/1/2024, 1:21:57 PM] Running 'skaffold version' (unmanaged)
[2/1/2024, 1:21:57 PM] v2.6.0

[2/1/2024, 1:21:57 PM] 'skaffold version' exited with code 0 took 51ms (unmanaged)
[2/1/2024, 1:21:57 PM] Running 'skaffold inspect modules list --filename /home/danortega/Documents/codeprojects/DSG/dsgov-work-manager/skaffold.yaml --format json' (unmanaged)
[2/1/2024, 1:21:57 PM] {"modules":[{"name":"work-manager","path":"/home/danortega/Documents/codeprojects/DSG/dsgov-work-manager/skaffold.yaml","isRoot":true}]}

[2/1/2024, 1:21:57 PM] 'skaffold inspect modules list --filename /home/danortega/Documents/codeprojects/DSG/dsgov-work-manager/skaffold.yaml --format json' exited with code 0 took 47ms (unmanaged)
[2/1/2024, 1:21:57 PM] [warn]Checking if the current context is a local cluster failed with error 'Error: Encountered an error while determining if this is a local cluster. Error: Error: Encountered an error while determining cluster type. Error: h [Error]: nodes is forbidden: User "system:anonymous" cannot list resource "nodes" in API group "" at the cluster scope
    at t.K8sApiErrorHandler.<anonymous> (/home/danortega/.vscode/extensions/googlecloudtools.cloudcode-2.3.0/dist/extension.js:14:10046588)
    at Generator.next (<anonymous>)
    at /home/danortega/.vscode/extensions/googlecloudtools.cloudcode-2.3.0/dist/extension.js:14:10045209
    at new Promise (<anonymous>)
    at a (/home/danortega/.vscode/extensions/googlecloudtools.cloudcode-2.3.0/dist/extension.js:14:10044954)
    at t.K8sApiErrorHandler.handleHttpRequestFailed (/home/danortega/.vscode/extensions/googlecloudtools.cloudcode-2.3.0/dist/extension.js:14:10046290)
    at t.K8sApiErrorHandler.<anonymous> (/home/danortega/.vscode/extensions/googlecloudtools.cloudcode-2.3.0/dist/extension.js:14:10045688)
    at Generator.next (<anonymous>)
    at /home/danortega/.vscode/extensions/googlecloudtools.cloudcode-2.3.0/dist/extension.js:14:10045209
    at new Promise (<anonymous>)
    at a (/home/danortega/.vscode/extensions/googlecloudtools.cloudcode-2.3.0/dist/extension.js:14:10044954)
    at s.ErrorWithActions.name (/home/danortega/.vscode/extensions/googlecloudtools.cloudcode-2.3.0/dist/extension.js:14:10045642)
    at Function.runHandlerFromError (/home/danortega/.vscode/extensions/googlecloudtools.cloudcode-2.3.0/dist/extension.js:14:10555382)
    at t.K8sApiErrorHandler.overrideError (/home/danortega/.vscode/extensions/googlecloudtools.cloudcode-2.3.0/dist/extension.js:14:10046197)
    at t.K8sApiErrorHandler.<anonymous> (/home/danortega/.vscode/extensions/googlecloudtools.cloudcode-2.3.0/dist/extension.js:14:10049042)
    at Generator.throw (<anonymous>)
    at s (/home/danortega/.vscode/extensions/googlecloudtools.cloudcode-2.3.0/dist/extension.js:14:10045062)
    at processTicksAndRejections (node:internal/process/task_queues:95:5) {
  actions: [Array],
  errorType: undefined
}
    at Function.<anonymous> (/home/danortega/.vscode/extensions/googlecloudtools.cloudcode-2.3.0/dist/extension.js:14:10563575)
    at Generator.throw (<anonymous>)
    at s (/home/danortega/.vscode/extensions/googlecloudtools.cloudcode-2.3.0/dist/extension.js:14:10561446)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)'

This was not happening some versions ago, and other extensions connecting to Minikube (like the Kubernetes extension) have no issues.

neutvd commented 1 month ago

Hi @Ortega-Dan, did you ever manage to resolve this? I'm running into the exact same issue.

ttosta-google commented 1 month ago

Hello @neutvd,

Please submit an issue using the Submit Feedback button. This will give us logs to better debug this issue.

Thanks!

neutvd commented 1 month ago

Hi @ttosta-google,

I just sent the feedback form. I am using the latest 2.16.7 version btw.

glouischandra commented 2 days ago

Hello @neutvd we're having a problem trying to repro the issue currently, is there by any chance you can send us the minikube log file, should be located in " ~/.minikube/logs/lastStart.txt"

Also is there any chance you're using L7 loadbalancing in your setup: https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/438, if so this issue might be related.