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 .
When you use role-based access control, you must install a specific version of the Helm CLI client and provide certificates that contain the 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 cloudctl, and log in to your cluster. See Installing cloudctl.
- 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 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 using cloudctl.
Complete the following steps to install the Helm CLI by using cloudctl:
-
From the console, select the user icon
, then click Configure client.
-
Click Install CLI tools. Tip: You can also install the Helm CLI without the console by entering the curl commands in this procedure at the command prompt, or in a Terminal window.
Note: To download the installation file by using curl commands, see Downloading the installation file by using curl commands. After you download the file, you can continue from step 3 to install the Helm CLI.
-
Obtain the
<cluster_address>
by using the following oc command:oc -n kube-public get configmap ibmcloud-cluster-info -o jsonpath='{.data.cluster_address}'
-
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_address>/api/cli/helm-darwin-amd64.tar.gz
Run the following example command to download the required files on the Linux operating system, replacing the variables with information for your environment:
curl -kLo <install_file> https://<cluster_address>/api/cli/helm-linux-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
-
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
-
Ensure that
TILLER_NAMESPACE
environment variable is defined. Tiller is deployed tokube-system
namespace. Specify the TILLER_NAMESPACE by entering the following command:export TILLER_NAMESPACE=kube-system
-
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 automatically installed.-
For environments with Internet access, run the following command:
helm init --client-only
-
For air gap 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
-
Downloading the installation file by using curl commands
You can complete the following steps to download the installation file:
-
Get the service hostnames. Use the
management-ingress
service hostname in the command to download the installation file.oc get route -n kube-system
Following is a sample output:
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD cp-console cp-console.apps.an.os.example.abc.com management-ingress <all> passthrough/Redirect None cp-proxy cp-proxy.apps.an.os.example.abc.com nginx-ingress https passthrough/Redirect None
-
Download the installation file.
-
For macOS, run the following command:
curl -kLo helm-darwin-amd64-v2.12.3.tar.gz https://cp-console.apps.an.os.example.abc.com:443/api/cli/helm-linux-amd64.tar.gz
-
For Linux® x86_64, run the following command:
curl -kLo helm-linux-amd64-v2.12.3.tar.gz https://cp-console.apps.an.os.example.abc.com:443/api/cli/helm-linux-amd64.tar.gz
-
For Linux on Power (ppc64le), run the following command:
curl -kLo helm-linux-ppc64le-v2.12.3.tar.gz https://cp-console.apps.an.os.example.abc.com:443/api/cli/helm-linux-ppc64le.tar.gz
-
For Windows (64-bit), run the following command:
curl -kLo helm-win-amd64-v2.12.3.tar.gz https://cp-console.apps.an.os.example.abc.com:443/api/cli/helm-win-amd64.tar.gz
-
For Linux on IBM Z and LinuxONE, run the following command:
curl -kLo helm-linux-s390x-v2.12.3.tar.gz https://cp-console.apps.an.os.example.abc.com:443/api/cli/helm-linux-s390x.tar.gz
-