microsoft / microsoft/vscode-remote-release

"Attach Visual Studio Code" doesn't use kubeconfig.yaml in current project

Open
#4,998 2 comments 2 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since May 6, 2021.

bug containers kubernetes
Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

When using the "Attach Visual Studio Code" context menu item on a kubernetes pod, the command doesn't send the kubeconfig.yaml contained within the project to kubectl (this does get used for things like get pod and terminal), causing the attach command to fail with Error running command remote-containers. "attachToK8sContainerFromViewlet"

You can work around this by adding the cluster, context and user from the local kubeconfig.yaml to your ~/.kube/config and setting the current-context in there to the context you just added, but this is not a workable solution long-term.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.