Skip to main content
Version 3.0

Integrations — PostgreSQL

ChartVersion3.0.1TypeapplicationAppVersion17.5.0
CompatibilityKubernetes1.32+OpenShift4.19+Rancher2.10.x+

Overview

The tdp-postgresql chart provides a PostgreSQL server inside the cluster. Charts such as OpenMetadata, Airflow, Ranger, Superset, Hive Metastore, and JupyterHub can use it as an external metadata database via TDP-Settings.externalDatabase. CloudBeaver uses PostgreSQL as an external metadata database (via tdp-cloudbeaver.database.*). Trino can query it as a data source via the JDBC connector.

Integration with each component is described on that component's integration page:

Internal service address

Once installed, PostgreSQL is accessible inside the cluster via the DNS name:

<RELEASE_NAME>.<NAMESPACE>.svc.cluster.local:5432

Replace <RELEASE_NAME> with the Helm release name and <NAMESPACE> with the namespace where the chart was installed.

Get the admin password

The postgres user password is automatically generated by the chart and stored in a Kubernetes Secret:

export POSTGRES_PASSWORD=$(kubectl get secret --namespace <NAMESPACE> <RELEASE_NAME> \
-o jsonpath="{.data['postgres-password']}" | base64 -d)
info

The Secret name corresponds to the release name (e.g., tdp-postgresql), with the key postgres-password.

Connect from inside the cluster

For testing or diagnostics from a temporary pod in the same namespace:

kubectl run <RELEASE_NAME>-client --rm --tty -i --restart='Never' \
--namespace <NAMESPACE> \
--image docker.io/bitnamilegacy/postgresql:17.5.0-debian-12-r20 \
--env="PGPASSWORD=$POSTGRES_PASSWORD" \
--command -- psql -h <RELEASE_NAME> -p 5432 -U postgres -d postgres

Connect from outside the cluster (port-forward)

For temporary access from outside the cluster — for example, from a workstation with the psql client:

kubectl port-forward --namespace <NAMESPACE> svc/<RELEASE_NAME> 5432:5432
psql -h 127.0.0.1 -p 5432 -U postgres -d postgres
note

Port-forward is suitable for testing and diagnostics. It is not a permanent access method.

Validation

kubectl -n <NAMESPACE> get pods
kubectl -n <NAMESPACE> get svc
kubectl -n <NAMESPACE> get pvc
kubectl -n <NAMESPACE> get events --sort-by=.lastTimestamp