aks-devx-tools icon indicating copy to clipboard operation
aks-devx-tools copied to clipboard

Failed to list namespaces: Error: connect ECONNREFUSED 127.0.0.1:6443

Open lgmorand opened this issue 2 years ago • 3 comments

Does this occur consistently? Yes Repro steps:

  1. Create a dummy project and use Draft to create the Dockerfile
  2. Use the command "AKS create deployment and service
  3. Specify the output folder, the name of the deployment and the exposed pod
  4. Boom error

from source code, it seems it wants to connect to some cluster. What if I can't access it from my dev machine ? What if I don't want to specify a namespace right now and just want to generate manifests ?

Action: aks-draft-extension.runDraftDeployment Error type: Error Error Message: Failed to list namespaces: Error: connect ECONNREFUSED redacted:id

Version: 0.1.1 OS: win32 OS Release: 10.0.22621 Product: Visual Studio Code Product Version: 1.75.1 Language: en

Call Stack
getAysncResult extension.js:2:4425587
extension.js:2:4404175extension.js:2:4404175

lgmorand avatar Feb 24 '23 20:02 lgmorand

Thanks for reporting this @lgmorand. At the moment, the extension tries to list the namespaces on your active cluster from your kubeconfig so that it includes that in the generated manifests. However, it shouldn't be strictly necessary. As an alternative, the extension can try to list and if it fails, it should prompt you to enter your desired namespace manually.

sabbour avatar Feb 28 '23 19:02 sabbour

Hello Ahmed :)

Exactly what I thought, especially because the command is already there (new PromptNewNamespace()) and the algorythm is almost ready but it does not take into account the case when the cluster is unreachable

lgmorand avatar Feb 28 '23 20:02 lgmorand

Reopening. PR closed it but this isn't closed until we make a release.

OliverMKing avatar Apr 26 '23 19:04 OliverMKing