Red Hat® OpenShift® 4 users can access certified software for container-based environments via the Red Hat Marketplace. Software in the marketplace is immediately available to deploy on any Red Hat OpenShift cluster in a fast, integrated way. In this tutorial, we show you how to configure a Red Hat OpenShift cluster with Red Hat Marketplace and connect the cluster to your command line interface (CLI).
- Red Hat OpenShift version 4.3 is required to use with software in Red Hat Marketplace. You can set up a class cluster on IBM Cloud using these instructions: Set up an OpenShift Cluster.
- Create an account on Red Hat Marketplace.
To configure and connect your Red Hat OpenShift cluster on Red Hat Marketplace, you will:
- Download an OpenShift command line interface (CLI) binary
- Register the cluster on Red Hat Marketplace
- Create a project in the OpenShift web console
- Connect to the OpenShift cluster in your CLI
To configure a Red Hat OpenShift cluster with Red Hat Marketplace, you need to download the OpenShift command line interface (CLI) binary, register the cluster on Red Hat Marketplace, and create a project in the Red Hat Marketplace console.
1. Download an OpenShift CLI binary
To launch the cluster console — also called Red Hat OpenShift Container Platform — follow these steps:
Log in to your IBM Cloud account and navigate to the dashboard.
Click Clusters and select the cluster you created in the prerequisites. In this case, the cluster name is
After you launch the cluster, click the OpenShift web console button on the top right-hand side of your screen.
From the Red Hat OpenShift Container Platform web console, select the question mark icon on the top right-hand side and select Command Line Tools.
Navigate to the section
oc - OpenShift Command Line Interface (CLI)and download the respective oc binary onto your local system.
Note: You need this binary to manage OpenShift projects from a terminal and to natively support OpenShift Container Platform features.
Now you are ready to register the OpenShift cluster on Red Hat Marketplace. This step is mandatory to install any operators from Red Hat Marketplace platform using the OpenShift cluster.
2. Register the cluster on Red Hat Marketplace
Log in to the Red Hat Marketplace. Select a workspace and click Clusters. You need to add the new OpenShift cluster and register it on the Red Hat Marketplace platform.
Update the cluster name, follow prompts to generate a pull secret, and save it.
In the GUI, copy the
curlcommand which starts with
curl -sL httpsand append the pull secret towards the end. Keep the entire script handy to use in the next step.
You need to start the cluster first to register it. Open a terminal and type
oc login, update the username and password which are used for accessing the cluster, and press Enter.
Your cluster should be up and running at this point. You need to run the entire script from the previous step and hit
Enter. It will take a couple of minutes to see that you have successfully registered the cluster on the Red Hat Marketplace portal. In the Status column, you should see the word “Registered” beside a green circle.
3. Create a project in the OpenShift web console
To create a project that you can use and manage from the command line, go to the Red Hat Marketplace web console and click Create Project. Name the project:
4. Connect to the OpenShift cluster in your CLI
Log in to the Red Hat OpenShift on IBM Cloud Kubernetes Service cluster through your CLI. To log in, you need a token which can be generated after you log in to OpenShift Cluster web console. Click the drop-down under your name in the right corner of your screen and select Copy Login Command.
A new window will open requesting the login token details. Copy the login token.
In your terminal, paste the login token. Once you log in, you should see a screen that has information about your login name, your server, the token, and the projects.