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 .
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:
- Install the Kubernetes command line tool,
kubectl
, and configure access to your cluster. See Installing the Kubernetes CLI (kubectl). - Install the IBM Cloud Private CLI and log in to your cluster. See Installing the IBM Cloud Private CLI.
- Obtain access to the boot node and the cluster administrator account, or request that someone with that access level create your certificate. If you cannot access the cluster administrator account, you need an IBM Cloud Private account that is
assigned to the administrator role for a team and can access the
kube-system
namespace.
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:
-
From the IBM Cloud Private management console Getting started page, click Install CLI tools.
-
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
-
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-->
-
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.
-
-
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 for the installation procedure.
Verifying the installation
-
If you are using Helm 2.12.3, you must set HELM_HOME:
export HELM_HOME=~/.helm
-
Initialize your Helm CLI. Important: Do not use the
--upgrade
flag with thehelm 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
-
-
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"}
-
Follow the steps to review a list of available or installed packages:
-
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/
-
View the available charts by running the following command:
helm search -l
-
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, andchart_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
-
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
-
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
-