OpenShift in Rocky Linux: Deploying Your First Application on OpenShift in Rocky Linux

After setting up OpenShift, the next step is to deploy your first application. This article guides you through deploying a sample application.

Prerequisites:

  • OpenShift cluster up and running on Rocky Linux
  • Access to OpenShift CLI (oc)

Steps:

  1. Login to OpenShift:
    oc login https://<openshift-api-server>:6443
  2. Create a New Project:
    oc new-project myproject
  3. Deploy a Sample Application:
    oc new-app https://github.com/sclorg/nodejs-ex -l name=myapp
  4. Expose the Application:
    oc expose svc/nodejs-ex
  5. Access the Application:
    Get the URL of the exposed service:

    oc get routes

    Open the URL in your browser to see your application running.