Docs home
Getting started
My profile
Account management
User management
Billing and invoices
Clusters
Red Hat Marketplace Operator
Operators
Troubleshooting
Security

Clusters

Register OpenShift cluster with Red Hat Marketplace

To install operators and container images from Red Hat Marketplace to your OpenShift cluster, first register the OpenShift cluster on Red Hat Marketplace.

Prerequisites

  • Add Cluster Admin role to your Red Hat Marketplace user profile.
  • Install OpenShift Container Platform, version 4.2 or later or Red Hat CodeReady Containers.
  • Install the version of the OpenShift Command-line Interface (CLI), commonly known as oc, that matches your version of OpenShift.
  • Install the jq package.
  • Log in to the cluster as OpenShift user with cluster-admin privileges.

About this task

To register a cluster, Red Hat Marketplace provides a command that installs the Red Hat Marketplace Operator and updates your global cluster pull secret. To learn more about the Operator, refer to About Red Hat Marketplace Operator

Note: when the command updates your global cluster pull secret, you may experience temporary interruptions to applications and services on the cluster. Red Hat Marketplace recommends you consider these temporary interruptions before you run the command.

Procedure

  1. On the main menu, click Workspace, click Clusters, and then click Add cluster.
  2. Create a pull secret by clicking Generate Secret next to the Pull secret name field. Optionally, you may choose to specify your own pull secret name, rather than using the pre-generated one.
  3. Copy the Install Red Hat Marketplace operator command. Make the following updates to the command:
    • By default, the command installs the Operator with automatic upgrades enabled. To install the Operator with manual upgrades enabled, add Manual at the end of the command.
  4. Login to your OpenShift cluster as a cluster admin and run the Install Red Hat Marketplace operator command.
  5. The script will prompt to add a friendly cluster name for easy reference in Red Hat Marketplace. You may optionally specify a name, or use the randomly generated name.
  6. Complete all steps until the script displays, “Red Hat Marketplace Operator successfully installed.”

Result

You registered your cluster.

Next Steps

When you run the Install Red Hat Marketplace operator command with manual updates enabled, go to your OpenShift Container Platform web console to approve the installation. Users associated to your Red Hat Marketplace account can install operators on to the registered cluster.


Register OpenShift cluster on Red Hat CodeReady Containers

Users can try operators locally with Red Hat CodeReady Containers. Red Hat Marketplace recommends local clusters for tasks with minimal performance requirements. To try all product features and functions, Red Hat Marketplace recommends installing operators and container images on remote OpenShift clusters, instead of clusters on local CodeReady Containers.

Prerequisites

  • Set up an OpenShift cluster on your local machine
  • Start your CodeReady Containers virtual machine
  • Register your local cluster with Red Hat Marketplace

About this task

On Red Hat Marketplace, users register local clusters similarly to remote clusters. However, for local clusters, to prepare it for operators, there is an additional procedure. Run the following commands after you register your cluster on Red Hat Marketplace.

Procedure

  1. To get the configuration information, run the following command, and then copy and paste the output to use later:
    oc get secret pull-secret -n openshift-config --output="jsonpath={.data.\.dockerconfigjson}" | base64 --decode
  2. To get the Node Name, run the following command, and then copy and paste the output to use later:
    oc get node
  3. To navigate to the node sh-4.2#, run the following command. Ensure you replace <nodename> with the Node Name you copied in step 2.
    oc debug node/<nodename>
  4. When the node shows, to navigate to the pod sh-4.4#, run the following command:
    chroot /host
  5. Navigate to the following file: /var/lib/kubelet/config.json.
    cd /var/lib/kubelet/
  6. To debug the node, open the config.json file and replace the content in the file with the output you copied on step 1.
    vi config.json
    gg
    dG
    i
    <paste output from step 1>
    :wq
  7. To exit the node, run the following command:
    exit
  8. Run the exit command again until the the following message shows:
    • Removing debug pod ...
  9. Stop your CodeReady Containers virtual machine, and then start it again.
    crc stop
    crc start

Result

Your local cluster is configured for Red Hat Marketplace.

Next Steps

Install an Operator to your local cluster.


About cluster name field

Cluster Name is read only. Use it to identify your clusters on Red Hat Marketplace.


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 Red Hat Marketplace user profile
  • Log on to your OpenShift cluster

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. Click Confirm.
  4. To unregister the cluster, run the following command:
    curl -sL https://marketplace.redhat.com/provisioning/v1/scripts/uninstall-rhm-operator | bash

Result

You unregistered your cluster. Your cluster stops communicating with Red Hat Marketplace. 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 doesn’t show on the page.


Cluster status descriptions

The following table shows descriptions of cluster status:

StatusDescriptionNext steps
Agent not installedyou named the cluster, but have not installed Red Hat Marketplace Operatorto complete registration, run the install Red Hat Marketplace Operator command.
Registeredyou installed the Red Hat Marketplace Operatorinstall product operators or unregister cluster
To be unregisteredyou ran the unregister cluster commandafter 1 hour, the cluster doesn’t show on the Clusters page.

Open OpenShift Container Platform web console

Prerequisites

  • Register your OpenShift cluster with Red Hat Marketplace.

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.