Clusters
Register OpenShift cluster
To enable usage reporting, first register the OpenShift cluster
Prerequisites
- Add Cluster Admin role to your user profile.
- Install OpenShift Container Platform, major version 4 with any available supported minor version.
- Install the version of the
OpenShift Command-line Interface (CLI),
commonly known as
oc
, that matches your version of OpenShift. - Install the jq package.
- Login to your OpenShift cluster as a cluster admin.
- Enable OpenShift user workload monitoring
About this task
To register a cluster, follow the commands to install the IBM Metrics Operator, IBM Data Reporter Operator, and update your global cluster pull secret. To learn more about the Operators, refer to Platform Operators.
Procedure
-
On the main menu, click Workspace, click Clusters, and then click Add cluster.
-
To create a pull secret, do the following:
- Optional - A default name shows on the Pull secret name box. To rename, on the Pull secret name box, enter a new name.
- Click Generate Secret.
-
To create a namespace, copy the Create namespace command, paste it on the command line, and run the command.
-
To create the operator subscription, copy the Create Subscription command, paste it on the command line, and run the command.
- By default, the command installs the operator subscriptions with
automatic updates. To
change the subscription to manual updates, copy the following command,
paste it on the command line, and run the command.
Note: To manually approve updates, go to your OpenShift Container Platform web console to approve the installation.oc apply -f "https://swc.saas.ibm.com/provisioning/v1/rhm-operator/rhm-operator-subscription?approvalStrategy=Manual&datareporter=true"
- By default, the command installs the operator subscriptions with
automatic updates. To
change the subscription to manual updates, copy the following command,
paste it on the command line, and run the command.
-
To create the Kubernetes secret, copy the Create Pull Secret command, paste it on the command line, and run the command.
-
To create the marketplace secret, copy the Add the pull secret command, paste it on the command line, and run the command.
Result
You registered and connected your cluster. Your cluster is ready to report usage data.
Next steps
- To view your cluster, select Workspace and click Clusters.
- To find your cluster name, refer to Find cluster name
About cluster name
The default cluster name is the cluster UUID defined in the OpenShift ClusterVersion CustomResource.
Find cluster name
Prerequisites
- Login to your OpenShift cluster as a cluster admin
Procedure
- To find your cluster name, copy the following command, paste it on the command line, and run the command.
oc get clusterversion -o jsonpath='{.items[].spec.clusterID}{"\n"}'
Result
The cluster name shows on the command line.
Related topics
Edit cluster display name
Prerequisites
Procedure
- On the main menu, click Workspace, click Clusters.
- On the row of your cluster, click the Menu options button (three dots), and then click View details. The Cluster details page shows.
- To edit cluster name, click Edit, on the Cluster name box, enter a new name, and then click Update.
Result
You edited the cluster display name.
Get pull secret
Use the pull secret to update your global cluster pull secret.
Procedure
- On the main menu, click your user name, click My Account, click Pull secrets, and then click Create pull secret.
- On the Pull secret name box, enter a unique name for your pull secret.
- To get your pull secret, on the Your pull secret box, click the Copy button (copy icon).
- Click Save.
Result
You copied your pull secret.
Related topics
Delete pull secret
Prerequisites
- Create a pull secret
About this task
Delete a pull secret when your cluster no longer needs to access image registries or when you rotate your pull secrets.
Note: delete pull secret locks access to image registries. Only delete the secret when you no longer need to access the image registry or when you replace a secret with a new secret.
Procedure
- On the main menu, click your user name, click My Account, and then click Pull secrets.
- On the row of the pull secret, click the Menu Options button (dots icon), and then click Delete.
- To delete the pull secret, click Delete.
Result
You deleted the pull secret.
Unregister OpenShift cluster
Prerequisites
- Associate the Cluster Admin role to your user profile
- Login to your OpenShift cluster as a cluster admin
Procedure
- On the main menu, click Workspace, and then click Clusters.
- On the row of the registered cluster, click the Menu Options button (dots icon), and then click Unregister.
- To unregister your cluster, copy the following command, paste it on the
command line, and run the command:
oc delete subscription ibm-metics-operator -n ibm-software-centraloc delete MarketplaceConfig marketplaceconfig -n ibm-software-centraloc get csv -n ibm-software-central --no-headers | awk '/ibm-metrics-operator/{print $1}' | xargs oc delete -n ibm-software-central csv
- Click Confirm.
Result
On the Clusters page, the status changes to To be unregistered. When Red Hat Marketplace confirms communication stopped between your cluster and Red Hat Marketplace, the cluster no longer shows on the Clusters page.
Remove offline cluster from list
Prerequisites
- Login as a cluster admin user
Procedure
- On the main menu, click Workspace, and then click Clusters.
- On the row of the offline cluster, click the Menu Options button (dots icon), and then click Remove.
- To remove the offline cluster from the list, click Remove.
Result
On the Clusters page, a success message shows and the cluster is removed from the list.
Cluster status descriptions
The following table shows descriptions of cluster status:
Status | Description | Next steps |
---|---|---|
Connected | You registered your cluster with the marketplace | Install product operators or unregister cluster |
Offline | You unregistered your cluster from the marketplace. | Remove offline cluster from list |
Operator not installed | You named the cluster but have not installed IBM Metrics Operator. | On the row of the cluster, click Menu options (dots icon), click Register, and then complete the steps that show on the window. |
To be unregistered | You unregistered your cluster from the marketplace. | After 1 hour, the cluster status shows as Offline. |
Open OpenShift Container Platform web console
Prerequisites
Procedure
- On the main menu, click Workspace, and then click Clusters.
- On the row of the cluster, click the Menu Options button (dots icon), and then click Cluster Console.
Result
Your OpenShift console opens in a new tab on your web browser.