3. Install PostgreSQL
The OpenFSC uses PostgreSQL to store various data, including the configuration of the various components and transaction logging. In this section, we install PostgreSQL using the CloudNative Postgres operator.
Before you start make sure your Kubernetes user has the required permissions to install the operator. The most easy way to ensure your user has the right permission is to assign the role cluster-admin
. If assigning the cluster-admin
role is not possible please review this page for the required permissions.
Install CloudNativePG operator by running:
kubectl apply --server-side -f \
https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.26/releases/cnpg-1.26.1.yaml
Then check if PostgreSQL is running properly by running:
kubectl rollout status deployment \
-n cnpg-system cnpg-controller-manager
The expected output should look like this:
deployment "cnpg-controller-manager" successfully rolled out
Install the postgres database by running:
kubectl apply -f db-manifest.yaml
Check if PostgreSQL is running:
kubectl -n fsc get pods | grep postgresql
The expected output should look like this:
postgresql-1 1/1 Running 0 2m55s
Make sure you get the password for PostgreSQL and write it down somewhere, we'll need this password later in this guide. Get the password with the following command:
kubectl get secret --namespace fsc postgresql-app -o jsonpath="{.data.password}" | base64 -d
Save this password somewhere without the closing %
sign
Now that Postgres is running we can deploy the Transaction Log.