Kubernetes command failed
See original GitHub issueI use kubectl on my Linux Mint box via snap. I run microk8s (still via snap) locally as well as using remote k8s clusters (Azure, Docker for Mac remotely, etc). I run helm also via snap. So, my snap list looks like (snippet):
Name Version Rev Tracking Publisher Notes
code a5d1cc28 34 latest/stable vscode✓ classic
core 16-2.45 9289 latest/stable canonical✓ core
docker 19.03.11 471 latest/stable canonical✓ -
helm 3.2.3 244 latest/stable snapcrafters classic
kubectl 1.18.3 1534 latest/stable canonical✓ classic
microk8s v1.18.3 1443 latest/stable canonical✓ classic
Note that I have a ~/.kube/config
with several clusters, all work fine from the shell.
I decided to give vscode-kubernetes-tools
a spin.
After installation when you click on the extension logo in the Activity Bar, the list of clusters, helm repos, and clouds stay empty (I saw the little progress bar running for each for a few seconds); a toaster popped up saying only: Kubectl command failed:
without any explanation whatsover.
I looked at the Output
view in the Log (Extension Host)
and nothing either.
Not sure where to look for information and reasons why the extension believes it cannot run kubectl
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
Top GitHub Comments
@lstocchi I installed the extension from the download link you gave me.
And I still get the
Kubectl command failed:
even after setting the flag:I restarted vscode entirely after setting it, just to be sure.
@gildas I was able to replicate it and i think i have a fix (#771) . Would you please try it and see if it works for you?
You can install the extension by using a vsix file. I created it (download link: https://github.com/lstocchi/vscode-kubernetes-tools/raw/master/vscode-kubernetes-tools-1.2.1.vsix ) or you can build it by yourself (you can use this branch https://github.com/lstocchi/vscode-kubernetes-tools/tree/i770 ).
Once installed you should keep seeing the error as before
Kubectl command failed:
. Now if you go in the settings page and set “vs-kubernetes.enable-snap-flag” to true the extension should start working normally (CMD/CTRL + SHIFT + P -> search forOpen Setting
-> click onPreferences: Open Settings (JSON)
-> add"vs-kubernetes.enable-snap-flag": true
and save).If you can confirm it works it would be really helpful for us. Thank you!!!