Skip to content
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

Error initializing on Linux #879

Open
Ortega-Dan opened this issue Feb 1, 2024 · 5 comments
Open

Error initializing on Linux #879

Ortega-Dan opened this issue Feb 1, 2024 · 5 comments
Labels
question Further information is requested

Comments

@Ortega-Dan
Copy link

Ortega-Dan commented Feb 1, 2024

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
Copy link

neutvd commented Aug 29, 2024

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

@ttosta-google
Copy link
Collaborator

ttosta-google commented Aug 29, 2024

Hello @neutvd,

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

Thanks!

@ttosta-google ttosta-google added the question Further information is requested label Aug 29, 2024
@neutvd
Copy link

neutvd commented Sep 2, 2024

Hi @ttosta-google,

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

@glouischandra
Copy link
Collaborator

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: kelseyhightower/kubernetes-the-hard-way#438, if so this issue might be related.

@neutvd
Copy link

neutvd commented Oct 11, 2024

Hi @glouischandra sorry it took me so long to respond. I have attached the lastStart.txt file from minikube.

lastStart.txt

I do have some clusters running on AWS EKS that use L7 load balancing, but these are not configured in the default ~/.kube/config file. I have to set a KUBECONFIG environment variable specifically to have kubectl and such pointing to it. Only minikube is configured in the default config file and it's what VSCode should be using when I run into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants