Business Scenario
You, as a developer, have been tasked with creating a PostgreSQL
(or simply Postgres) database on Kubernetes that persists data on a PersistentVolume
.
Exercise Options
You can perform this exercise in two ways:
- Platform Simulation – follow the step-by-step instructions within the simulation.
- Live Environment - by using the instructions provided below, you can perform the steps in the SAP BTP Free Tier account.
We strongly recommend first performing the steps in the Live Environment.
Platform Simulation
Choose the Start Exercise button below to open a simulation of the platform. Then follow the step-by-step instructions to deploy a Postgres database using a StatefulSet.
ExerciseStart Exercise
Live Environment
In this exercise, you will perform the following steps:
- Create a PersistentVolume.
- Create PersistentVolumeClaim.
- Deploy a Postgres database using a StatefulSet.
- Verify that the PersistentVolumeClaim is bound.
Prerequisites
- You have successfully created a SAP BTP, Kyma runtime instance in the SAP BTP subaccount.
- You have configured kubectl to work with your SAP BTP, Kyma runtime instance.
Result
You have created a stateful application via a StatefulSet and used Kubernetes storage primitives to persist data.