Installing IBM Cloud Pak® CLI (cloudctl)

You can use IBM Cloud Pak® CLI (cloudctl) to view information about your cluster, manage your cluster, install Helm charts and workloads, and more.

After you install IBM Cloud Pak® CLI (cloudctl), you can install another supported CLI on Windows, Linux®, or macOS.

To set up the IBM Cloud Pak® CLI, complete the following steps:

  1. From the console, select the user icon user icon, then click Configure client.

  2. Click Install CLI tools. Tip: You can also install the IBM Cloud Pak® 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 set up cloudctl.

  3. Expand Install IBM Cloud Pak CLI (cloudctl). 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 to download the required files. For example, you can run the following command for macOS:

    curl -kLo <install_file> https://<cluster address>/api/cli/cloudctl-darwin-amd64
    

    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/cloudctl-linux-amd64
    
  4. After you run the curl command for your operating system, continue to install the IBM Cloud Pak® CLI.

    To install the IBM Cloud Pak® CLI, run the command that matches your client computer operating system, where <path_to_installer> is the path to the directory where you downloaded the cloudctl file, and <install_file> is the downloaded file name.

  5. Confirm that cloudctl is installed:

    cloudctl --help
    

    The cloudctl usage is displayed.

  6. Set up the kubectl CLI. See Installing the Kubernetes CLI (kubectl) for installation instructions.

  7. Log in to your cluster with the following command, where <cluster_address> is defined in Common service endpoint.

    cloudctl login -a https://<cluster address> --skip-ssl-validation
    

    You can now use cloudctl to view information about your cluster and manage your clusters.

Downloading the installation file by using curl commands

You can complete the following steps to download the installation file:

  1. Get the service hostnames. Use the management-ingress service hostname in the command to download the installation file.

    oc get route -n ibm-common-services
    

    Following is a sample output:

    NAME           HOST/PORT                           PATH      SERVICES                 PORT       TERMINATION            WILDCARD
    cp-console     cp-console.apps.an.os.example.abc.com         icp-management-ingress   <all>      reencrypt/Redirect     None
    cp-proxy       cp-proxy.apps.an.os.example.abc.com           nginx-ingress-controller https      passthrough/Redirect   None
    
  2. Download the installation file.