# Adding OpenShift Clusters

NOTE

Adding an OpenShift cluster requires a pre-existing Group and Private Cloud-type Cloud. See Groups and Clouds documentation elsewhere in this user manual for more details on those constructs.

To onboard an OpenShift cluster, begin by collecting an API token and API URL from OpenShift. Bear in mind the integration user with HPE Morpheus Enterprise must be a full administrator user.

1. Log into the OpenShift console
2. In the far top-right of the application window, click on the name of the logged in user to expand a small dropdown menu
3. Click "Copy login command"
4. Click "Display Token"
5. On the resulting screen, both the API URL and the API token can be copied. You will need to enter these values directly into the "Add Cluster" modal within HPE Morpheus Enterprise in the next step

With the authentication details available, head back to HPE Morpheus Enterprise to add a new OpenShift cluster:

1. Navigate to Infrastructure > Clusters
2. Click + Add Cluster
3. Select "RED HAT OPENSHIFT CLUSTER" and click Next
4. On the Group tab, select the HPE Morpheus Enterprise Group to associate with the cluster and click Next
5. On the Name tab, you must at least configure a "Cluster Name" attribute and select a Cloud. The "Cluster Name" is a friendly name to identify the OpenShift cluster in HPE Morpheus Enterprise. The Cloud configuration requires you to select a pre-existing Private Cloud-type Cloud. There are optional configurations here as well, such as applying Labels or adding a description
6. On the Configure tab, select the Layout that corresponds closest to the version of OpenShift running on the cluster. Integration with HPE Morpheus Enterprise requires OpenShift version 4.x at minimum. On this tab, you'll also enter the API URL and service token collected earlier. If "Inventory Existing Instances" is checked, HPE Morpheus Enterprise with automatically onboard any virtualized workloads which are currently running on the cluster and any that are provisioned directly from the OpenShift console in the future. Click Next
7. On the Review tab, click Complete
8. Within a short time, the new OpenShift cluster will appear on the clusters list page alongside any other cluster that may currently be running
