Installing the Helm CLI (helm)

You can use the Helm command line interface (CLI) to manage releases in your cluster.

For more information about Helm, see Helm docs in GitHub Opens in a new tab.

Because IBM Cloud Private offers role-based access control, you must install a specific version of the Helm CLI client and provide certificates that contain the IBM Cloud Private access token for a specific account.

Important: After you configure a connection, you must add the --tls option to Helm commands that access the server through Tiller.

Before you set up the Helm CLI, you must complete the following steps:

Installing the Helm CLI

You can install the Helm CLI from the IBM Cloud Private CLI.

Complete the following steps to install the Helm CLI by using the IBM Cloud Private CLI:

  1. From the IBM Cloud Private management console Getting started page, click Install CLI tools.

  2. Expand Install Helm CLI. Read the text, then copy and run the curl command for your operating system. Continue the installation procedure in the product documentation.

    Choose the curl command for the applicable operating system. For example, you can run the following command for macOS:

    curl -kLo <install_file> https://<Cluster Master Host>:<Cluster Master API Port>/api/cli/helm-darwin-amd64.tar.gz
    
  3. After you run the curl command for your operating system, make a helm-unpacked directory and unpack the installation file into that directory with the following commands:

    mkdir helm-unpacked
    
    tar -xvzf ./<path_to_installer> -C helm-unpacked 
    <!-- doc test blocked here-->
    
  4. Change the file to an executable, then move the file to your directory:

    • For Linux® and macOS, run the following commands to change and move the file:

      chmod 755 ./helm-unpacked/<unpacked_dir>/helm
      
      sudo mv ./helm-unpacked/<unpacked_dir>/helm /usr/local/bin/helm
      
    • For Windows™, rename the downloaded file to helm and place the file on the PATH environment variable.

  5. Delete the installer and extra unpacked archives:

     rm -rf ./helm-unpacked ./<path_to_installer>
    

Note: You can also download the Helm CLI from the Helm community. See Helm v2.12.3 - Bug Fix Release Opens in a new tab for the installation procedure.

Verifying the installation

  1. If you are using Helm 2.12.3, you must set HELM_HOME:

     export HELM_HOME=~/.helm
    
  2. Initialize your Helm CLI. Important: Do not use the --upgrade flag with the helm init command. Adding the --upgrade flag replaces the server version of Helm Tiller that is installed with IBM Cloud Private.

    • For environments with Internet access, run the following command:

      helm init --client-only
      
    • For airgap environments, run the following command:

      helm init --client-only --skip-refresh
      
  3. Verify that the Helm CLI is initialized. Run the following command:

     helm version --tls
    

    The output resembles the following content:

     Client: &version.Version{SemVer:"v2.12.3", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}
    
     Server: &version.Version{SemVer:"v2.12.3+icp", GitCommit:"843201eceab24e7102ebb87cb00d82bc973d84a7", GitTreeState:"clean"}
    
  4. Follow the steps to review a list of available or installed packages:

    1. Add a Helm repository. To add the Kubernetes Incubator repository, run the following command:

       helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
      
    2. View the available charts by running the following command:

       helm search -l
      
    3. Install a chart. Run the following command:

       helm install --name=release_name stable/chart_in_repo --tls
      

      In this command, release_name is the name for the release to be created from the chart, and chart_in_repo is the name of the available chart to install. For example, to install the WordPress chart, run the following command:

       helm install --name=my-wordpress stable/wordpress --tls
      
    4. List releases by running the following command:

       helm list --tls
      

      The output resembles the following content:

       NAME                REVISION    UPDATED                     STATUS      CHART                  NAMESPACE
       my-wordpress        1           Wed Jun 28 22:15:13 2017    DEPLOYED    wordpress-0.6.5        default
      
    5. To remove a release, run the following command:

       helm delete release_name --purge --tls
      

      In this command, release_name is the name of the release to remove. For example, to remove the WordPress release, run the following command:

       helm delete my-wordpress --purge --tls