# Postgresql

This stack deploys an 'operated', centralized postgresql cluster via cloudnative-pg's operator. Movetokube's `ext-postgres-operator` is deployed to automate provisioning per-app users and databases. For webUI-based db administration and querying, `pgadmin` is deployed separately in the `database` namespace (see `kubernetes/apps/database/pgadmin/`).

Alternatively, an [`init` container](https://github.com/onedr0p/containers/tree/main/apps/postgres-init) can be [attached to deployments as an initContainer](https://github.com/onedr0p/home-ops/blob/74133ad006a1fed52a87b8163d3f7b9a2e22e75b/kubernetes/archive/default/guacamole/app/guacamole/helmrelease.yaml) and used to provision application databases.

> **Note**
>
> Source: [`kubernetes/apps/datasci/postgres/README.md`](https://github.com/ahgraber/homelab-gitops-k3s/blob/main/kubernetes/apps/datasci/postgres/README.md)
