+

Search Tips  |   Advanced Search


OpenShift Overview

With Red Hat OpenShift on IBM Cloud, you can deploy apps on highly available OpenShift clusters that run the Red Hat OpenShift on IBM Cloud Container Platform software on Red Hat Enterprise Linux machines.

First, create a classic Red Hat OpenShift on IBM Cloud cluster or a cluster on the second generation of compute infrastructure in a Virtual Private Cloud (VPC). Then, deploy and expose a sample app in the cluster.

To complete the getting started tutorial, use a Pay-As-You-Go or Subscription IBM Cloud Kubernetes Service account where you are the owner or have full Administrator access.


Creating a classic OpenShift cluster

Create a Red Hat OpenShift on IBM Cloud cluster on classic IBM Cloud infrastructure in the IBM Cloud console. To get started, create a cluster that runs OpenShift Container Platform version 4.5. The operating system is Red Hat Enterprise Linux 7.

To learn more about customizing the cluster setup with the CLI, see Creating an OpenShift cluster.

  1. Log in to your IBM Cloud account.

  2. From the Catalog, click Red Hat OpenShift on IBM Cloud.

  3. Review the platform version details, OpenShift 4.4.29.

  4. If you see the OCP entitlement section: Leave the value set to Purchase additional licenses for this worker pool because you are not using an IBM Cloud Pak for this getting started cluster.

  5. For the Infrastructure, select Classic.

  6. Configure the Location details for the cluster.

    1. Select the Resource group that you want to create the cluster in. We cannot change the resource group later. If you do not select a resource group, the cluster is created in the default resource group.

    2. Select a Geography to create the cluster in, such as North America. The geography helps filter the Availability and Data centers values that you can select.

    3. Select the Availability that you want for the cluster, such as Single zone.

    4. Select the Worker zone to create the cluster in, such as Dallas 10.

  7. Configure your Worker pool setup.

    1. If you want a larger size for your worker nodes, click Change flavor. Otherwise, leave the default 4 vCPUs / 16 GB flavor selected.

    2. Set how many worker nodes to create per zone, such as the minimum value of 2. See What is the smallest size cluster that I can make?.

  8. Complete the Resource details to customize the cluster name and any tags that you want to use to organize your IBM Cloud resources.

  9. In the Summary pane, review the order summary and then click Create.

    Your cluster creation might take some time to complete. After the cluster state shows Normal, the cluster network and load balancing components take about 10 more minutes to deploy and update the cluster domain that you use for the OpenShift web console and other routes. Before you continue, wait until the cluster is ready by checking that the Ingress Subdomain follows a pattern of <cluster_name>.<globally_unique_account_HASH>-0001.<region>.containers.appdomain.cloud.

  10. Verify that the cluster setup is finished before continuing to the next step by checking that the worker nodes on the Worker Nodes tab have a Status of normal.

Now that the cluster is ready, deploy your first app



Creating a VPC Gen 2 compute cluster

Create a VPC Generation 2 compute cluster by using the IBM Cloud console. VPC OpenShift clusters run version 4.5, which includes Kubernetes version 1.18. The operating system is Red Hat Enterprise Linux 7.

Want to learn more about customizing the cluster setup with the CLI? Check out Creating a VPC Gen 2 compute cluster.

  1. Create a Virtual Private Cloud (VPC) on generation 2 compute.

    1. Navigate to the VPC create console.

    2. Make sure that the banner at the beginning of the page is set to Gen 2 compute. If Gen 1 compute is set, click Switch to Gen 2 compute.

    3. Give the VPC a name and select a resource group to deploy the VPC into.

    4. Give the VPC subnet a name and select the location where you want to create the cluster.

    5. Attach a public gateway to your subnet so that you can access public endpoints from the cluster. This public gateway is used later on to access default OpenShift components like the web console, OperatorHub, and service catalog.

    6. Click Create virtual private cloud.

  2. From the Red Hat OpenShift on IBM Cloud dashboard, click Create cluster.

  3. Configure the cluster's VPC environment.

    1. Review the platform version details, OpenShift 4.4.29.

    2. If you see the OCP entitlement section: Leave the value set to Purchase additional licenses for this worker pool because you are not using an IBM Cloud Pak for this getting started cluster.

    3. For the Infrastructure, select VPC.

    4. From the Virtual private cloud drop-down menu, select the Gen 2 VPC that you created earlier.

    5. From the Cloud Object Storage drop-down menu, select a standard IBM Cloud Object Storage instance to use for the internal OpenShift container registry, or create a standard IBM Cloud Object Storage instance to use.

  4. Configure the Location details for the cluster.

    1. Select the Resource group that you want to create the cluster in. We cannot change the resource group later. If you do not select a resource group, the cluster is created in the default resource group.
    2. Select the zones to create the cluster in. The zones are filtered based on the VPC that you selected, and include the subnets that you previously created.

  5. Configure your Worker pool setup.

    1. If you want a larger size for your worker nodes, click Change flavor. Otherwise, leave the default 4 vCPUs / 16 GB flavor selected.

    2. Set how many worker nodes to create per zone, such as the minimum value of 2. See What is the smallest size cluster that I can make?.

  6. Complete the Resource details to customize the cluster name and any tags that you want to use to organize your IBM Cloud resources.

  7. In the Summary pane, review the order summary and then click Create.

    Your cluster creation might take some time to complete. After the cluster state shows Normal, the cluster network and load balancing components take about 10 more minutes to deploy and update the cluster domain that you use for the OpenShift web console and other routes. Before you continue, wait until the cluster is ready by checking that the Ingress Subdomain follows a pattern of <cluster_name>.<globally_unique_account_HASH>-0001.<region>.containers.appdomain.cloud.

  8. OpenShift version 4.4 and earlier only: Allow traffic requests to apps that you deploy by modifying the VPC's default security group.

    1. From the Virtual private cloud dashboard, click the name of the Default Security Group for the VPC that you created.

    2. In the Inbound rules section, click New rule.

    3. Choose the TCP protocol, enter 30000 for the Port min and 32767 for the Port max, and leave the Any source type selected.

    4. Click Save.

    5. If you require VPC VPN access or classic infrastructure access into this cluster, repeat these steps to add a rule that uses the UDP protocol, 30000 for the Port min, 32767 for the Port max, and the Any source type.

The worker node can take a few minutes to provision, but you can see the progress in the Worker nodes tab. When the status reaches Ready, you can start working with the cluster by deploying your first app


Deploying an app with the OpenShift service catalog

From the OpenShift console, you can deploy one of the built-in service catalog apps and expose the app with a route.

  1. From the cluster details page, click OpenShift web console.

  2. From the side navigation menu in the Administrator perspective, click Home > Projects and then click Create Project. Enter a name for the project, and click Create. Now that the project is created by the administrator, you can switch to the Developer perspective to create an app.

  3. From the side navigation menu, select Developer from the perspective switcher.

  4. Click +Add. From the Add pane menu bar, make sure that the Project is the one that you just created.

  5. Click From Catalog. The Developer Catalog opens in the pane.

  6. From the navigation menu in the pane, click Languages > JavaScript.

  7. Click Node.js, and then click Create Application. Note that you might need to click Clear All Filters to display the Node.js option. After selecting Node.js, the Create Source-to-Image Application pane opens.

  8. In the Git section, click Try Sample.

  9. Scroll to confirm that Deployment and Create a route to the application are selected, and then click Create.

  10. Wait a few minutes for the pods to deploy. To check the status of the pods, from the Topology pane, click your nodejs app and review its sidebar. You must see that the nodejs build is complete, and that the nodejs pod is in a Running state to continue.

  11. When the deployment is complete, click the route location URL, which has a format similar to the following.

      http://nodejs-<project>.<cluster_name>-<hash>.<region>.containers.appdomain.cloud

    A new tab in your browser opens with a message similar to the following.

      Welcome to your Node.js application on OpenShift

  12. Optional: To clean up the resources that you created, select Administrator from the perspective switcher, navigate to Home > Projects, click the project's action menu, and click Delete Project.


What's next?


See