Using storage in containerized applications

The following example shows a typical setup of a sample application using persistence for the data.

In this example, the application uses a PostgreSQL database. Both, the application and the PostgreSQL DB run in containers inside pods within the same OpenShift Container Platform cluster.

  1. The PostgreSQL DB gets deployed in OpenShift. This can be done for example through an image stream, which is pulled from quay.io or docker hub.
  2. A persistent volume claim (PVC) for that PostgreSQL is defined. PVC details can be specified in a YAML File and include access mode and storage class. The referenced storage class is provided by IBM Fusion Data Foundation. PostgreSQL can run in its pod without worrying about how the actual physical storage is provided. IBM Fusion Data Foundation takes care of mapping the specified PVC to real physical storage internally.
  3. The sample application is deployed in OpenShift as well. In this example the demo application interacts with the database via Web App Endpoints exposed by the PostgreSQL, which has been deployed and configured as described above.
Figure 1. Using storage in applications (I)
The content of this image is explained in the surrounding text.
Figure 2. Using storage in applications (II)
The content of this image is explained in the surrounding text.