CLI tools
Optionally install the command line interface (CLI) tools cloudctl
(deprecated) and kubectl
.
Install the IBM Cloud Pak® CLI (cloudctl)
You can use IBM Cloud Pak® CLI (cloudctl) to view information about your cluster, manage your cluster, and more.
After you install IBM Cloud Pak® CLI (cloudctl), you can install another supported CLI, such as the Kubernetes command line tool (kubectl).
To set up the IBM Cloud Pak® CLI, complete the following steps:
-
Get the service hostnames. Use the
management-ingress
service hostname in the command to download the installation file.oc get route -n <project>
Where
<project>
is the project (namespace) that IBM Cloud Pak for AIOps is deployed in. -
Download the installation file with the following command. Replace the
<cluster_address>
with your IBM Cloud Pak console route.curl -kLo cloudctl-linux-amd64-v3.2.3-1557 https://<cluster address>/api/cli/cloudctl-linux-amd64
If you need to get the IBM Cloud Pak console route, run the following command:
oc get route -n <project> cp-console -o jsonpath=‘{.spec.host}’
Where
<project>
is the project (namespace) that IBM Cloud Pak for AIOps is deployed in. -
Change the file to an executable file and move the file with the following command. Replace
<path_to_installer>
with the path to the directory where you downloaded the cloudctl file, and replace<install_file>
with the downloaded file name.chmod 755 <path_to_installer>/<install_file>
sudo mv <path_to_installer>/<install_file> /usr/local/bin/cloudctl
In this example, it is moved to the
/usr/local/bin/cloudctl
directory. -
Confirm that cloudctl is installed:
cloudctl --help
The cloudctl usage is displayed.
-
Log in to your cluster with the following command. Replace
<cluster_address>
with your IBM Cloud Pak console route.cloudctl login -a https://<cluster address> --skip-ssl-validation
You can now use cloudctl to view information about your cluster and manage your clusters.
Installing the Kubernetes CLI (kubectl)
You can install and configure the Kubernetes command line tool (kubectl) to complete cluster administrator tasks. Some tasks require the use of both the kubectl tool and the IBM Cloud Pak® CLI (cloudctl).
Before you begin:
-
Install the IBM Cloud Pak® CLI (cloudctl).
-
Synchronize the clocks between your client computer and the nodes in your cluster. To synchronize your clocks, use network time protocol (NTP). For more information about setting up NTP, see the user documentation for your operating system.
To set up the kubectl CLI, complete the following steps. You can also download from Kubernetes. For more information, see Install and Set Up kubectl .
-
Get the service hostnames. Use the
management-ingress
service hostname in the command to download the installation file.oc get route -n kube-system
-
Download the installation file with the following command. Replace the
<cluster_address>
with your IBM Cloud Pak console route.curl -kLo kubectl-linux-amd64-v1.13.11 https://<cluster address>/api/cli/kubectl-linux-amd64
If you need to get the IBM Cloud Pak console route, run the following command:
oc get route -n <project> cp-console -o jsonpath=‘{.spec.host}’
Where
<project>
is the project (namespace) that IBM Cloud Pak for AIOps is deployed in. -
Change the file to an executable file and move the file with the following command. Replace
<path_to_installer>
with the path to the directory where you downloaded the kubectl file, and replace<install_file>
with the downloaded file name.chmod 755 <path_to_installer>/<install_file>
sudo mv <path_to_installer>/<install_file> /usr/local/bin/kubectl
In this example, it is moved to the
/usr/local/bin/kubectl
directory. -
Confirm that kubectl is installed:
kubectl version --client
The kubectl information is displayed.
-
Obtain the cluster configuration details. You can obtain the cluster configuration details by using cloudctl. For more information about the cloudctl commands that you can run, see Managing your cluster with IBM Cloud Pak CLI (cloudctl)
.