Reputation: 1
I am currently deploying a wso2 api manager to Kubernetes. I want to change the Carbon_DB H2 database to connect to PostgreSQL. But I can't figure out if each node needs a separate database or if it can be shared?
I couldn't find the information, but I don't want to do H2 on PVC. Thanks for the help.
Upvotes: 0
Views: 18
Reputation: 429
You can share the database between nodes. In order to change the database from H2 to Postgres, you need to add the database configuration as follows in the deployment.toml file
Sample configuration will be as follows.
[database.shared_db]
type = "postgre"
url = "jdbc:postgresql://localhost:5432/shared_db"
username = "sharedadmin"
password = "sharedadmin"
driver = "org.postgresql.Driver"
validationQuery = "SELECT 1"
[database.apim_db]
type = "postgre"
url = "jdbc:postgresql://localhost:5432/apim_db"
username = "apimadmin"
password = "apimadmin"
driver = "org.postgresql.Driver"
validationQuery = "SELECT 1"
Please refer to the documentation [1] for more info.
Upvotes: 0