Show List

Deploy Application in OpenShift


Deploying applications on OpenShift involves several steps, including creating the necessary resources, building and packaging the application components, and deploying the components to the OpenShift environment. Here is a high-level overview of the process:

  1. Resource creation: Before deploying an application, you need to create the necessary resources in OpenShift, such as projects, services, and routes. These resources define the environment in which the application will run and provide the necessary connectivity and configuration for the application components.

  2. Building the application: Once the resources have been created, you need to build and package the application components. This may involve compiling code, building containers, and creating images that can be deployed to the OpenShift environment.

  3. Deploying the application: After the application components have been built and packaged, you can deploy the components to the OpenShift environment. This involves uploading the images to the OpenShift registry, creating and configuring the necessary pods and services, and testing the application to ensure that it is running correctly.

Here is an example of deployment:

Create a New Project

Click on the create project button on the top right

Enter details and click on "Create"
Click on the new project to enter dashboard and then click on "Browse Catalogue" button and select the type of project.
We are going to deploy the image "itcodelab/firstrepo:docker-rest-image" we pushed to docker hub in This Chapter 

Click on the "Deploy Image" button, enter Image Name and click on search icon.
When the image is found in docker hub, results would be displayed:
Click on Deploy. You can see the running pod as the deployment completes.
Currently the application is showing there is no external route. Click on "Create route" link
Enter the details and click on "Create" button at the bottom:
It will create and list the route to access the application:
The application can now be tested using API client like postman:

    Leave a Comment


  • captcha text