Kubernetes Tools Visual Studio Code



  • A Visual Studio Code extension for interacting with Kubernetes clusters. This extension combines the vs-kubernetes extension by @brendandburns and the vs-helm extension by @technosophos.

    Configuring
    Setting up your environment
    This extension assumes that you have a Dockerfile in the root directory of your project.

    It also assumes that you have the following binaries on your PATH:

    kubectl
    docker
    git
    helm (optional)
    draft (optional)
    For kubectl, helm and draft the binaries need not be on the system PATH, provided you tell the extension their locations using the appropriate vs-kubernetes -> vs-kubernetes.${tool}-path configuration setting. See "Extension Settings" below.

    The extension can install kubectl, helm and draft for you if they are missing - choose Install dependencies when you see an error notification for the missing tool. This will set kubectl-path, helm-path and draft-path entries in your configuration - the programs will not be installed on the system PATH, but this will be sufficient for them to work with the extension.

    If you are working with Azure Container Services or Azure Kubernetes Services, then you can install and configure kubectl using the Kubernetes: Add Existing Cluster command.

    If you plan to create managed clusters using Microsoft Azure (ACS or AKS), or to add clusters in those environments to your kubeconfig, then you will need Azure CLI 2.0.23 or above. You do not need Azure CLI if you do not use Azure, or to interact with Azure clusters that are already in your kubeconfig.

    Setting up your environment for Helm and Draft
    helm support requires that you have Helm installed and configured.

    To use the Helm: DryRun command, your Kubernetes cluster must be running Tiller.

    For setting up draft you can provide a path to the binary via configuration (vs-kubernetes.draft-path) if it is not on your PATH.

    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 user and repository for your images. You can do this via preferences in VS Code:

    File > Preferences

    And then add:

    {
    ...
    "vsdocker.imageUser": "<your-image-prefix-here>",
    ...
    }
    Where <your-image-prefix-here> is something like docker.io/brendanburns.

    Selecting a kubeconfig file
    By default, the extension uses the active kubeconfig file -- that is, the file to which the KUBECONFIG environment variable points, or the default kubeconfig if no KUBECONFIG environment variable exists. If you want to swap kubeconfig files, you can specify the file path in the vs-kubernetes.kubeconfig setting in your user or workspace settings.

    Running from source
    If you are building and running the extension from source, see CONTRIBUTING.md for prerequisites for the development environment.

    For more information click here


Log in to reply
 

Suggested Topics

| |