Clusters

Register OpenShift cluster

To enable usage reporting, first register the OpenShift cluster

Prerequisites

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

  1. On the main menu, click Workspace, click Clusters, and then click Add cluster.

  2. To create a pull secret, do the following:

    1. Optional - A default name shows on the Pull secret name box. To rename, on the Pull secret name box, enter a new name.
    2. Click Generate Secret.
  3. To create a namespace, copy the Create namespace command, paste it on the command line, and run the command.

  4. 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.
      oc apply -f "https://swc.saas.ibm.com/provisioning/v1/rhm-operator/rhm-operator-subscription?approvalStrategy=Manual&datareporter=true"
      Note: To manually approve updates, go to your OpenShift Container Platform web console to approve the installation.
  5. To create the Kubernetes secret, copy the Create Pull Secret command, paste it on the command line, and run the command.

  6. 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

  1. On the main menu, click Workspace, click Clusters.
  2. On the row of your cluster, click the Menu options button (three dots), and then click View details. The Cluster details page shows.
  3. 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

  1. On the main menu, click your user name, click My Account, click Pull secrets, and then click Create pull secret.
  2. On the Pull secret name box, enter a unique name for your pull secret.
  3. To get your pull secret, on the Your pull secret box, click the Copy button (copy icon).
  4. Click Save.

Result

You copied your pull secret.

Related topics


Delete pull secret

Prerequisites

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

  1. On the main menu, click your user name, click My Account, and then click Pull secrets.
  2. On the row of the pull secret, click the Menu Options button (dots icon), and then click Delete.
  3. 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

  1. On the main menu, click Workspace, and then click Clusters.
  2. On the row of the registered cluster, click the Menu Options button (dots icon), and then click Unregister.
  3. 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-central
    oc delete MarketplaceConfig marketplaceconfig -n ibm-software-central
    oc get csv -n ibm-software-central --no-headers | awk '/ibm-metrics-operator/{print $1}' | xargs oc delete -n ibm-software-central csv
  4. 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

  1. On the main menu, click Workspace, and then click Clusters.
  2. On the row of the offline cluster, click the Menu Options button (dots icon), and then click Remove.
  3. 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:

StatusDescriptionNext steps
ConnectedYou registered your cluster with the marketplaceInstall product operators or unregister cluster
OfflineYou unregistered your cluster from the marketplace.Remove offline cluster from list
Operator not installedYou 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 unregisteredYou unregistered your cluster from the marketplace.After 1 hour, the cluster status shows as Offline.

Open OpenShift Container Platform web console

Prerequisites

Procedure

  1. On the main menu, click Workspace, and then click Clusters.
  2. 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.