Downloading kubectl and Helm

Integrating ScanCentral DAST with Kubernetes requires use of the following software:

The Helm CLI tool uses kubectl for all its interactions with Kubernetes clusters, so download and install these two software packages on the same machine.

Downloading in Windows PowerShell

To download kubectl and Helm in Windows:

  1. In PowerShell, enter the following to download kubectl for Windows and add it to $PATH:

    mkdir C:\docker\tools 
    cd C:\docker\tools Invoke-WebRequest `
     -Uri https://dl.k8s.io/release/v1.20.0/bin/windows/amd64/kubectl.exe `
     -OutFile .\kubectl.exe;
    $env:Path += ";C:\docker\tools"
    [Environment]::SetEnvironmentVariable("Path", $env:Path, [EnvironmentVariableTarget]::Machine)
    [Environment]::SetEnvironmentVariable("Path", $env:Path, [EnvironmentVariableTarget]::User)

  2. Enter the following to download and install Helm for windows:

    Invoke-WebRequest `
     -Uri https://get.helm.sh/helm-v3.5.1-windows-amd64.zip `
     -OutFile .\helm-v3.5.1-windows-amd64.zip; 
    Unzip and copy helm.exe into: C:\docker\tools 
    rm .\helm-v3.5.1-windows-amd64.zip;
    
  3. Enter the following to determine if the kubeconfig file points to the correct cluster:

    kubectl cluster-info

    Tip: You can change the default cluster by way of the kubectl config set-context command.

    If you are using the Azure command-line interface (CLI), then you can use the following command:

    az aks get-credentials --resource-group <resource-group-name> 
    	--name <Kubernetes-cluster-name>

Downloading in Linux

To download kubectl and Helm in Linux:

  1. Enter the following to download and install kubectl in Linux:

    curl -LO "https://dl.k8s.io/release/$(curl -L -s
    https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
    sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
  2. Enter the following to download and install Helm in Linux:

    wget https://get.helm.sh/helm-v3.5.0-linux-amd64.tar.gz
    tar -xzf helm-v3.5.0-linux-amd64.tar.gz
    cd ./<helm-tar-dir>
    sudo install -o root -g root -m 0755 helm /usr/local/bin/helm