pgAdmin4¶
Web-based PostgreSQL administration interface.
Overview¶
| Property | Value |
|---|---|
| Namespace | pgadmin |
| Type | HelmRelease |
| Layer | Database UI (Layer 6) |
| Dependencies | PostgreSQL Cluster |
| Access | http://pgadmin.local |
Purpose¶
pgAdmin4 provides a graphical interface for managing PostgreSQL databases, executing queries, and monitoring database health.
Features¶
- Query Tool - Execute SQL with syntax highlighting
- Object Browser - Navigate schemas, tables, views
- Dashboard - Server metrics and activity
- Backup/Restore - Database backup management
- ERD Designer - Visual schema design
- Query History - Track executed queries
Access¶
Credentials¶
Credentials are stored in External Secrets, synced from LocalStack:
Connecting to PostgreSQL¶
Pre-configured Server¶
pgAdmin may be pre-configured with the PostgreSQL cluster connection. If not:
- Right-click "Servers" → "Register" → "Server"
- Configure:
| Field | Value |
|---|---|
| Name | postgresql-cluster |
| Host | postgresql-cluster-rw.cnpg-system |
| Port | 5432 |
| Username | From secret |
| Password | From secret |
Connection String¶
Common Tasks¶
Execute Query¶
- Select database in object browser
- Click "Query Tool" button
- Enter SQL and press F5 or click Execute
View Table Data¶
- Navigate to schema → table
- Right-click → "View/Edit Data" → "All Rows"
Export Data¶
- Right-click table → "Import/Export Data"
- Select format (CSV, JSON, etc.)
- Configure options and export
Verification¶
Troubleshooting¶
Cannot login¶
- Check credentials in secret
- Verify External Secret is synced
- Check LocalStack has the secret
Cannot connect to PostgreSQL¶
- Verify PostgreSQL cluster is healthy
- Check network connectivity
- Verify credentials
# Test from pgadmin pod
kubectl exec -it -n pgadmin deploy/pgadmin -- \
psql -h postgresql-cluster-rw.cnpg-system -U app -d appdb -c "SELECT 1"
Slow performance¶
- Check pod resources
- Increase memory limits if needed
- Clear pgAdmin cache
Related¶
- PostgreSQL - Database cluster
- External Secrets - Credential management