Setting up the Helm CLI
You can use the Helm command line interface (CLI) to manage releases in your cluster.
For more information about Helm, see https://github.com/kubernetes/helm/tree/master/docs .
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 Accessing your IBM Cloud Private cluster by using the kubectl CLI. - 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 by downloading it from the Helm GitHub site. Complete the following steps to install the Helm CLI:
-
Download the Helm v2.9.1 binary. For more details to download the Helm v2.9.1 binary from the Helm GitHub site, see Helm 2.9.1 .
-
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
-
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 in a directory that is listed in the PATH environment variable.
-
-
Delete the installer and extra unpacked archives:
rm -rf ./helm-unpacked ./<path_to_installer>
See github.com/helm for additional information about the installation procedure.
Verifying the installation
-
If you are using Helm 2.9.1, 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 environments that do not have Internet access, 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.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"} Server: &version.Version{SemVer:"v2.9.1+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
-