Running a PostgreSQL instance can easily be done by using docker compose:
docker compose up -dUsing the config/workload.yaml it is possible to build, test and deploy this application onto a
Kubernetes cluster that is provisioned with Tanzu Application Platform (https://tanzu.vmware.com/application-platform).
As with the local deployment a PostgreSQL instance needs to be available at the cluster.
-
App Operator Tasks
-
Create the service
ClassClaimto be consumed by your workload that references your PostgreSQL instance:$ tanzu service class-claim create customer-database --class postgresql-unmanaged -n <workload-namespace>
-
-
App Developer Tasks
Now that we have the database instance and class claim configured, we can check the database state by running:
tanzu services class-claims get customer-database -n <workload-namespace>
Make sure the claim status is "Ready".
As soon as the database claim is ready, the
Workloadcan be deployed.