Closed rajserc closed 3 years ago
Hi @rajserc, thanks for reporting this issue.
Are there any more log files in the %TEMP%/Bridge to Kubernetes directory, e.g. bridge-library-*.txt
or bridge-endpointmanager-*.txt
? It would also be helpful to get the VSCode logs, which you can find by running "Developer: Open Extension Logs Folder" in the command palette. The bridge logs will be in the folder "mindaro.mindaro". You can email them to BridgeToKubernetes@microsoft.com if you don't feel comfortable uploading them here.
Another thing to check: does it look like the Bridge extension activated correctly? If it did, you should be able to see the "Kubernetes" item in your status bar showing your current namespace & cluster, like this: If you could please confirm that there isn't a warning triangle or any dependencies in the process of downloading, that would help eliminate some issues.
Unfortunately i dont see any other file in %TEMP% dir. (win 10 btw).
The kubernetes icon on the bottom does show the namespace correctly and there is no error.
The k8s cluster is rancher with rbac, should i give some permissions ? The pod is a openfaas python fast api function, i guess it doesnt matter.
Can you share the log file from the Brdige To Kubernetes VS Code extension? You can get the path of the log file from the output window:
Also what are the versions of Bridge To Kubernetes VS Code extension and Kubernetes VS Code extension?
There is no output in the output tab.
The only thing i see is "Command 'Bridge to Kubernetes: Configure' resulted in an error (Running the contributed command: 'mindaro.configure' failed.)"
I completely remove the plugin and reinstalled/restarted and tried again and its same issue. Is there some way to enable some more debug/vebosity to file/ui ?
@rajserc Are you sure that you are selecting the Bridge To Kubernetes
in the right side top dropdown as highlighted in the below screenshot?
I selected BtK in the drop down and the image is attached.
mindaro-vscode-2021-02-23T21-50-43.593Z-domain.txt I went to the path specified in the output and attached it.
@rajserc Looking at the logs, everything seems fine.
Bridge to Kubernetes: Open Menu
command? Do you see any errors running this command?May be i should try with sample app and try, is there a python sample available ?
Attaching the console log and VS code version info.
Version: 1.53.2 (user setup) Commit: 622cb03f7e070a9670c94bae1a45d78d7181fbd4 Date: 2021-02-11T11:48:04.245Z Electron: 11.2.1 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.18363
@rajserc Thanks for sharing the console logs. It seems like the python extension tht13.python
is interfering with Bridge To Kubernetes extension.
When the configure command is run Bridge To Kubernetes would update the tasks.json & launch.json files to setup debug profile. When doing this the python extension is interfering with the update process and hence the failure.
We don't have a python sample readily available for you to try out. We can investigate this issue and will update this thread.
Is the python project on which you are trying Bridge To Kubernetes is simple and can be shared with our team? If so you can share the details here or send an email to BridgeToKubernetes@microsoft.com. We can quickly work on it and provide a solution to you.
Thanks!
@rajserc Could you please try to disable/uninstall the tht13.python
extension so that we can validate it is the one causing the interference? I agree with @rakeshvanga that it looks related but, trying to install this other extension myself, I couldn't reproduce the issue.
I deleted the python extension and also removed the extension folder completely and retried.
Command 'Bridge to Kubernetes: Configure' resulted in an error (Running the contributed command: 'mindaro.configure' failed.)
Also, tried removing B2k extension and restarted and tried.
No error in log but still see the same popup error on the right. Command 'Bridge to Kubernetes: Configure' resulted in an error (Running the contributed command: 'mindaro.configure' failed.)
@rajserc This is very weird.
Can you try our sample todo
app : https://github.com/microsoft/mindaro/tree/master/samples/todo-app and let us know if it works?
I'm trying to understand if this is an issue with Bridge To Kubernetes not able to handle the k8s cluster rancher with rbac.
i am getting similar to this https://stackoverflow.com/questions/65998115/getting-error-failed-to-load-current-kubeconfig-please-confirm-that-your-kube
Terminal will be reused by tasks, press any key to close it.
Executing task: bridge-to-kubernetes.service <
Redirecting Kubernetes service stats-api to your machine... Target cluster: sandbox Current cluster: sandbox Target namespace: todo-app Current namespace: todo-app Target service name: stats-api Target service ports: 3001 Using kubernetes service environment variables: false
Error: Failed to load current kubeconfig. Please confirm that your kubeconfig is valid.
The terminal process terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.
Not sure how if the kubeconfig file is not valid, it was able to show right namespace and show service and connect to it.
2021-03-05T05:41:18.395Z | Common Extension Root | TRACE | Event: binaries-utility-try-get-binaries-success
2021-03-05T05:41:18.395Z | Common Extension Root | TRACE | Event: connect-service-task-terminal-start-connect
@rajserc, sometimes we fail to parse the kubeconfig because of certain fields. Could you please take a look at #111 and #126 to see if either of these fields ("extenstions", or a script to generate user token) is present in your kubeconfig?
ok, minikube extension in kube config was causing it, after removing that, it seems to be working. I will try to debug python
still not working for python, any sample setup would be great
@rajserc What error message are you getting when you try to debug your python app?
I get this message.
I did try https://github.com/Azure-Samples/azure-voting-app-redis this and it is working. So may be its the app, but im not able to figure out what is wrong. Its a simple app using fastapi with openfaas. I used following launch config.
mindaro-vscode-2021-03-14T04-36-25.449Z.txt
{ "type": "python", "name": "Python Debug with Kubernetes", "request": "launch", "command": "npm run dev", "cwd": "${workspaceFolder}", "preLaunchTask": "bridge-to-kubernetes.service", "env": { "GRPC_DNS_RESOLVER": "native" } }
@rajserc I see you have closed the issue. Were you able to figure out a way to get Bridge To Kubernetes working for fastapi
app?
Describe the bug Trying to debug app running in pod on an existing cluster shows error "Command 'Bridge to Kubernetes: Configure' resulted in an error (Running the contributed command: 'mindaro.configure' failed.)". This happens after all the four steps are completed.
To Reproduce Steps to follow to reproduce this issue.
Select the kubernetes cluster with correct namespace ctrl+shift P, select Bridge to Kubernetes configure option