Installing IBM Cloud Pak® CLI (cloudctl)

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

Before you begin

To install IBM Cloud Pak® CLI (cloudctl), you must first download the installation file by using curl commands.

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
    

    This is an example 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.

    • For macOS, run:

      curl -kLo cloudctl-darwin-amd64-v3.2.3-1557 https://cp-console.apps.an.os.example.abc.com:443/api/cli/cloudctl-darwin-amd64
      
    • For Linux® x86_64, run:

      curl -kLo cloudctl-linux-amd64-v3.2.3-1557 https://cp-console.apps.an.os.example.abc.com:443/api/cli/cloudctl-linux-amd64
      
    • For Linux on Power (ppc64le):

      curl -kLo cloudctl-linux-ppc64le-v3.2.3-1557 https://cp-console.apps.an.os.example.abc.com:443/api/cli/cloudctl-linux-ppc64le
      
    • For Windows (64-bit), run:

      curl -kLo cloudctl-win-amd64-v3.2.3-1557.exe https://cp-console.apps.an.os.example.abc.com:443/api/cli/cloudctl-win-amd64.exe
      
    • For Linux on IBM Z and LinuxONE, run:

      curl -kLo cloudctl-linux-s390x-v3.2.3-1557 https://cp-console.apps.an.os.example.abc.com:443/api/cli/cloudctl-linux-s390x
      

Setting up IBM Cloud Pak® CLI

To set up your IBM Cloud Pak® CLI, complete the steps in the following section.

  1. 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
    
  2. 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.

    • For example, for Linux and macOS, run the following commands to change and move the file. Remember that the curl command for your cluster is located in the console:

      chmod 755 <path_to_installer>/<install_file>
      
      sudo mv <path_to_installer>/<install_file> /usr/local/bin/cloudctl
      
    • For Windows, rename the downloaded file to cloudctl and place the file on the PATH environment variable.

  3. Confirm that cloudctl is installed:

    cloudctl --help
    

    The cloudctl usage is displayed.

  4. Log in to your cluster with the following command:

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

    Where <cluster_address> is the IBM Cloud Pak console route. You can get the IBM Cloud Pak console route by running the following command:

     oc get route -n ibm-common-services cp-console -o jsonpath=‘{.spec.host}’
    

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

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