Editing a PostgreSQL database
Written by
Updated at July 24, 2026
If you have a PostgreSQL database in your cluster, you can edit its settings.
Using the CLI
-
Open the
PostgresqlDatabaseresource, e.g., by running this command:kubectl edit PostgresqlDatabase <resource_name> -n <project_name>. -
Edit the parameters:
spec.owner: Database owner role.spec.allowConnections: Permission to connect to the database.spec.connectionLimit: Limit on simultaneous connections. If set to-1, there is no limit.spec.isTemplate: Use the database as a template to create other databases.spec.tablespace: Default tablespace.spec.schemas: List of managed schemas. To delete a schema, set the value tostate: absentor delete the item from the list.
-
Apply the manifest:
kubectl apply -f postgresqldatabase.yaml -n <project_name>.
Once the database is created, you cannot change the name, template, encoding, localeProvider, locale, localeCollate, localeCType, icuLocale, icuRules, builtinLocale, or collationVersion field.