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:
- Login to OpenShift:
oc login https://<openshift-api-server>:6443 - Create a New Project:
oc new-project myproject - Deploy a Sample Application:
oc new-app https://github.com/sclorg/nodejs-ex -l name=myapp - Expose the Application:
oc expose svc/nodejs-ex - Access the Application:
Get the URL of the exposed service:oc get routesOpen the URL in your browser to see your application running.