View on GitHub

workshop-quarkus-openshift-reactive-messaging

Workshop: Reactive Messaging with Quarkus on OpenShift

Navigator:


Lab 3: Deploy Postgres via Operator

In this lab you’ll deploy Postgres and set up a database which is used by the ‘Articles’ service.

Step 1: Create Project

In the Cloud Shell enter the following command.

$ oc new-project postgres

kafka deployment

Step 2: Install the Postgres Operator

Open the OperatorHub page and filter by ‘postgres’. Open the operator ‘PostgreSQL Operator by Dev4devs.com’.

kafka deployment

Click ‘Install’.

kafka deployment

Create a subscription. Make sure your new project ‘postgres’ is selected in the combobox.

kafka deployment

Step 3: Create the Database

Click on the operator.

kafka deployment

Click on ‘Create Instance’ in the ‘Database Database’ box.

kafka deployment

Edit the yaml. The database name needs to be changed to ‘database-articles’. The namespace should be ‘postgres’ by default. After this click ‘Create’.

kafka deployment

Step 4: Verify the Installation

On the ‘Pods’ page select the project ‘postgres’. Make sure the pod ‘database-articles….’ is running.

kafka deployment


Continue with Lab 4: Deploy Sample Application