vs-kubernetes provides a Visual Studio Code extension for interacting with Kubernetes clusters.
Setting up your environment
This extension assumes that you have a
Dockerfile in the root directory of
It also assumes that you have the following binaries on your
If you don't have those on your PATH then the extension will fail in
For setting up
kubectl you have a couple of additional options:
kubectl is not on your PATH then you can tell the extension its location using the
vs-kubernetes.kubectl-path workspace setting. This should be the full file name and path of the kubectl binary.
- If you are using the extension to work with an Azure Container Service then you can install and configure
kubectl using the
Kubernetes Configure from ACS command.
For setting up
draft you can also do this via configuration.
Setting up the image repository path
If you want to use the
Kubernetes Run and
Kubernetes Debug features
then you need to have correctly set the image and repository for your
images. You can do this via preferences in VS-Code:
File > Preferences
And then add:
<your-image-prefix-here> is something like
vs-kubernetes supports a number of commands for interacting with Kubernetes, they are accessible via the command
Kubernetes Load - Load a resource from the Kubernetes API and create a new editor window.
Kubernetes Get - Get the status for a specific resource.
Kubernetes Logs - Get logs for a pod in an output window.
Commands while viewing a Kubernetes file
Kubernetes Explain - Use the
kubectl explain ... tool to annotate Kubernetes API objects
Kubernetes Create - Create an object using the current document
Kubernetes Delete - Delete an object contained in the current document.
Kubernetes Apply - Apply changes to an object contained in the current document.
Kubernetes Expose - Expose the object in the current document as a service.
Commands for application directories
Kubernetes Run - Run the current application as a Kubernetes Deployment
Kubernetes Terminal - Open an interactive terminal session in a pod of the Kubernetes Deployment
Kubernetes Exec - Run a command in a pod of the Kubernetes Deployment
Kubernetes Debug - Run the current application as a Kubernetes Deployment and attach a debugging session to it (currently works only for Node.js deployments)
Kubernetes Remove Debug - Remove the deployment and/or service created for a
Kubernetes Debug session
Kubernetes Configure from ACS - Install and configure the Kubernetes command line tool (kubectl) from an Azure Container Service
Draft is a tool to simplify the process of developing a new Kubernetes application, by creating the necessary deployment components and by keeping code in the cluster in sync with the code on your computer.
Kubernetes Draft: Create - Set up Draft in the current folder (prerequisite for syncing using Draft)
Kubernetes Draft: Up - Runs Draft to watch the current folder and keep the cluster in sync with it
NOTE: Draft itself is in 'draft' form and is not yet stable. So the extension support for Draft is strictly experimental - assumptions may break, and commands and behavior may change!
vs-kubernetes - Parent for Kubernetes-related extension settings
vs-kubernetes.namespace - The namespace to use for all commands
vs-kubernetes.kubectl-path - File path to the kubectl binary. Note this is the binary file itself, not just the directory containing the file. On Windows, this must contain the
vs-kubernetes.draft-path - File path to the draft binary. Note this is the binary file itself, not just the directory containing the file. On Windows, this must contain the
vsdocker.imageUser - Image prefix for docker images e.g. 'docker.io/brendanburns'
Nothing known (plenty unknown ;)
Initial release of vs-kubernetes
kubernetes sync which synchronizes your git repo with running containers
- Initial release of the extension in the marketplace
Add checking for the
kubectl binary in the
Add support for 'diff' between files and objects on server
Add support for exec and terminal into pods
Add support for interactive node.js debugging (Alpha)
Auto build/push for run and debug
Fix a hard-coded value that made debug not work on any machine except mine...
Lots of fixes.
- Ivan Towlson
- Bhargav Nookala