Member-only story
Running a PostgreSQL app in Openshift & connecting to it!
This blog aims to create an application of PostgreSQL database into Openshift, & then connect to the database running in that application.
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.
- 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