Installing the IBM® Cloud Private CLI

If you install the IBM Cloud Private command line interface (CLI), you can create and manage new clusters.

After you install IBM Cloud Private, you can install the CLI on Windows, Linux, or macOS.

  1. Synchronize the clocks in between the client computer and the nodes in the IBM Cloud Private cluster. To synchronize your clocks, you can use network time protocol (NTP). For more information about setting up NTP, see the user documentation for your operating system.

  2. From the IBM Cloud Private management console, click Menu > Command Line Tools > Cloud Private CLI to download the installer by using a curl command. Copy and run the curl command for your operating system, then continue the installation procedure:

    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 ip>:<port>/api/cli/cloudctl-darwin-amd64
  3. After you run the curl command for your operating system, continue to install the IBM Cloud Private CLI.

    To install the IBM Cloud Private CLI, run the command that matches your node architecture. <path_to_installer> is the path to the directory where you downloaded the CLI file and <install_file> is the downloaded file name.

    For Linux and MacOS, run the following commands to change and move the file:

    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.

  4. Confirm that the IBM Cloud Private CLI is installed:

       cloudctl --help

    The IBM Cloud Private CLI usage is displayed.

  5. Set up the kubectl CLI. See Accessing your IBM Cloud Private cluster by using the kubectl CLI.

  6. Log in to your cluster:

     cloudctl login -a https://<cluster_host_name>:8443 --skip-ssl-validation

    Where cluster_host_name is the external host name or IP address for your master or leading master node.

    You can now use the IBM Cloud Private CLI to view information about your first cluster, install more content for your cluster, or configure more clusters. If you use the IBM Cloud Private CLI to configure a new cluster, you can use the CLI to add or remove worker nodes to it.