flathub / flathub/com.visualstudio.code
Include vs-kubernetes/tools/kubectl in path.
- Lingua principale
- Shell
- Stelle
- 217
- Fork
- 82
- Merge medio
- 1g 7h
- PR unite (30g)
- 1
Descrizione
By using the official Kubernetes extension (_ms-kubernetes-tools.vscode-kubernetes-tools_), Visual Studio Code can automatically install binaries for kubectl, helm, and minikube.
Unfortunately, if you attempt to explore workloads and try to attach vscode to a running pod, you encounter the following error:
**Error running command remote-containers.attachToK8sContainerFromViewlet: A system error occurred (spawn kubectl ENOENT). This is likely caused by the extension that contributes remote-containers.attachToK8sContainerFromViewlet.**
To fix this issue, you can edit code.sh (line 67) by adding the following path:
**${XDG_DATA_HOME}/.local/state/vs-kubernetes/tools/kubectl**
After making this change, vscode is able to find the kubectl binary and the extension will be fully functional.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Apri code.sh e ispeziona la riga 67, quindi confronta le voci di PATH con il percorso di kubectl installato dall’estensione Kubernetes. Includi il percorso richiesto vs-kubernetes/tools/kubectl e verifica che VS Code riesca a trovare kubectl quando si collega a un pod in esecuzione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- kubernetes, shell, vscode
- Ambito
- devops, devtools
- Tipo di issue
- Bug
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 55/100