Member-only story

Running a PostgreSQL app in Openshift & connecting to it!

Harshit Dawar
3 min readApr 15, 2023

--

This blog aims to create an application of PostgreSQL database into Openshift, & then connect to the database running in that application.

Source

Postgresql is one of the most famous databases available & Openshift is the best tool available in the market for container orchestration. Therefore, working with both will be the best thing to do.

Let’s get started with it then.

Creating a Postgres Application in Openshift!

Any Openshift Environment can be used for the application deployment, whether cloud-based, on-premises, or playground based. Once you have the Openshift Environment ready with you, then you just have to perform the following steps to launch the Postgres application.

  1. Execute the below-mentioned command to run a Postgres application with the username & password of your choice, & make sure you remember these details or you can note it down somewhere.
# You can substitute your username & password in the below command!
oc new-app --image=postgres --name=database -e POSTGRES_USER=harshitdawar -e POSTGRES_PASSWORD=postgres

--

--

Harshit Dawar
Harshit Dawar

Written by Harshit Dawar

Complete AIOPS Expert, have a demonstrated history of delivering large and complex projects. 28x Globally Certified. Rare & authentic content publisher.

Responses (1)