microsoft / mindaro

Bridge to Kubernetes - for Visual Studio and Visual Studio Code
MIT License
307 stars 106 forks source link

"Something went wrong" message - local minikube and remote GKE (on GCP) present same error #193

Open maucaro opened 3 years ago

maucaro commented 3 years ago

Describe the bug Can't get past "Something went wrong" message.

To Reproduce After the basic ToDo sample, I tried a more complex app (eShopOnContainers) but I can't seem to get past "Something went wrong. As clusters I tried minikube on my machine and a GKE cluster on GCP and get the same result. I captured the logs and am including them.

**Expected behavior** It should just work. If not, better reasons why and suggestions on possible fixes. **Logs** ![VS B2K Error 2021-06-23 051103](https://user-images.githubusercontent.com/4775834/123040911-61e0fa80-d3a9-11eb-8887-2dbec144a6ef.png) [Bridge To Kubernetes.zip](https://github.com/microsoft/mindaro/files/6699150/Bridge.To.Kubernetes.zip) [Microsoft.VisualStudio.Kubernetes.Debugging.zip](https://github.com/microsoft/mindaro/files/6699152/Microsoft.VisualStudio.Kubernetes.Debugging.zip) **Environment Details** Client used (VS Code/Visual Studio): Visual Studio Client's version: Microsoft Visual Studio Enterprise 2019 Version 16.10.2 VisualStudio.16.Release/16.10.2+31410.357 Microsoft .NET Framework Version 4.8.04084 Installed Version: Enterprise .NET Core Debugging with WSL 2 1.0 .NET Core Debugging with WSL 2 ADL Tools Service Provider 1.0 This package contains services used by Data Lake tools ASA Service Provider 1.0 ASP.NET and Web Tools 2019 16.10.526.50910 ASP.NET and Web Tools 2019 ASP.NET Web Frameworks and Tools 2019 16.10.526.50910 For additional information, visit https://www.asp.net/ Azure App Service Tools v3.0.0 16.10.526.50910 Azure App Service Tools v3.0.0 Azure Data Lake Node 1.0 This package contains the Data Lake integration nodes for Server Explorer. Azure Data Lake Tools for Visual Studio 2.6.1000.0 Microsoft Azure Data Lake Tools for Visual Studio Azure Functions and Web Jobs Tools 16.10.526.50910 Azure Functions and Web Jobs Tools Azure Stream Analytics Tools for Visual Studio 2.6.1000.0 Microsoft Azure Stream Analytics Tools for Visual Studio Bridge to Kubernetes 0.1 Bridge to Kubernetes for Visual Studio 2019 C# Tools 3.10.0-4.21269.26+029847714208ebe49668667c60ea5b0a294e0fcb C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used. Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools. Fabric.DiagnosticEvents 1.0 Fabric Diagnostic Events IntelliCode Extension 1.0 IntelliCode Visual Studio Extension Detailed Info Microsoft Azure HDInsight Azure Node 2.6.1000.0 HDInsight Node under Azure Node Microsoft Azure Hive Query Language Service 2.6.1000.0 Language service for Hive query Microsoft Azure Service Fabric Tools for Visual Studio 16.10 Microsoft Azure Service Fabric Tools for Visual Studio Microsoft Azure Stream Analytics Language Service 2.6.1000.0 Language service for Azure Stream Analytics Microsoft Azure Stream Analytics Node 1.0 Azure Stream Analytics Node under Azure Node Microsoft Azure Tools 2.9 Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.40423.1 Microsoft Continuous Delivery Tools for Visual Studio 0.4 Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE. Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines Microsoft Library Manager 2.1.113+g422d40002e.RR Install client-side libraries easily to any web project Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers Microsoft Visual Studio Tools for Containers 1.2 Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container. NuGet Package Manager 5.10.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/ ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info Razor (ASP.NET Core) 16.1.0.2122504+13c05c96ea6bdbe550bd88b0bf6cdddf8cde1725 Provides languages services for ASP.NET Core Razor. Snapshot Debugging Extension 1.0 Snapshot Debugging Visual Studio Extension Detailed Info SQL Server Data Tools 16.0.62105.04180 Microsoft SQL Server Data Tools ToolWindowHostedEditor 1.0 Hosting json editor into a tool window TypeScript Tools 16.0.30429.2002 TypeScript Tools for Microsoft Visual Studio Visual Basic Tools 3.10.0-4.21269.26+029847714208ebe49668667c60ea5b0a294e0fcb Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used. Visual F# Tools 16.10.0-beta.21262.7+1b23bbeda88ea3cb9be9af777f4c99fa8663df81 Microsoft Visual F# Tools Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio Visual Studio Container Tools Extensions 1.0 View, manage, and diagnose containers within Visual Studio. Visual Studio Tools for Containers 1.0 Visual Studio Tools for Containers Visual Studio Tools for Kubernetes 1.0 Visual Studio Tools for Kubernetes Operating System: Edition Windows 10 Enterprise N Version 20H2 Installed on ‎5/‎13/‎2021 OS build 19042.1052 Experience Windows Feature Experience Pack 120.2212.2020.0 Device name dev-eshop Processor Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz 2.39 GHz Installed RAM 16.0 GB System type 64-bit operating system, x64-based processor Pen and touch Pen and touch support with 10 touch points **Additional context** Add any other outputs from the clients or context you would like to share.
amsoedal commented 3 years ago

Hi @maucaro, sorry you're running into this issue. I had a look at your logs, and it looks like the Kubernetes client is timing out trying to talk to your cluster. Could you please confirm that your kubeconfig is pointing to a valid cluster (e.g. by running kubectl get pods from the command line)? Also we should definitely be returning a better error in this case, I will make a note on our side for that.

maucaro commented 3 years ago

Thanks @amsoedal. Yes, I absolutely do have connectivity. In parallel I was deploying and monitoring both clusters. Proof I had connectivity lies in the fact that I was able to configure and then change the configuration of B2K without an issue. Namespaces and services were populated correctly.

amsoedal commented 3 years ago

Hey @maucaro, sorry for the late reply. To be clear, does this only happen when you're using a certain application (i.e. the sample app worked on your GKE cluster?) From here we have a few options -- we'll probably need to open an issue on the Kubernetes client, and in parallel I'll bump up the priority for us to upgrade to the latest kubernetes client package in case that helps anything.

maucaro commented 3 years ago

Thanks @amsoedal ; yes, the ToDo sample app did work. I wanted to try ToDo app again, and am now encountering the symptoms described in #111 and #126 . I stopped minikube (which causes the minikube entry to de deleted in kubeconfig) in order to rule out #111 but the issue remained, so I suspect it's something similar to #126. Since last time, I've switched from cert-based auth to interactive login and given #126 I think this is probably the reason for the new error. My kubeconfig now looks like this:


apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: <valid-auth-data>
    server: https://kubernetes.docker.internal:6443
  name: docker-desktop
- cluster:
    certificate-authority-data: <valid-auth-data>
    server: https://<valid-ip>
  name: gke_<gcp-project-id>_us-west2_autopilot-cluster-eshop
contexts:
- context:
    cluster: docker-desktop
    user: docker-desktop
  name: docker-desktop
- context:
    cluster: gke_<gcp-project-id>_us-west2_autopilot-cluster-eshop
    user: gke_<gcp-project-id>_us-west2_autopilot-cluster-eshop
  name: gke-eshop
current-context: gke-eshop
kind: Config
preferences: {}
users:
- name: docker-desktop
  user:
    client-certificate-data: <valid-auth-data>
    client-key-data: <valid-auth-data>
- name: gke_<gcp-project-id>-185119_us-west2_autopilot-cluster-eshop
  user:
    auth-provider:
      config:
        access-token: <valid-access-token>
        cmd-args: config config-helper --format=json
        cmd-path: C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\gcloud.cmd
        expiry: "2021-06-29T23:25:38Z"
        expiry-key: '{.credential.token_expiry}'
        token-key: '{.credential.access_token}'
      name: gcp

I'm providing this so that you can hopefully test this as you are addressing #126.

I will, however, not be pursuing this further. I love the concept but as it stands BTK is not in a state where it can be useful for my needs. I will probably revisit this in a few months and hope to see a better fit.

Really appreciate your help!

maucaro commented 3 years ago

One suggestion: get eShopOnContainers working with B2K and document and share the process and experience. B2K can potentially shine with a medium-complexity app where running it all on the development workstation is too heavy and slow. As a matter of fact, this was precisely my motivation. See this other issue I opened: Debugging in VS 2019 is painfully slow.

Thanks again!

amsoedal commented 3 years ago

@maucaro thanks so much for giving us a try and for your valuable feedback! I've made a note of this sample app for the future, I think you make a very compelling point. We'll upgrade our kubernetes client in the meantime and hopefully we'll suit your needs if you try us out again in the future :)