Kubernetes
Architecture​
The Helm chart deploys:
- backend-app - FastAPI backend serving the
/apiendpoints - backend-log - FastAPI backend serving the
/logendpoints (data ingestion) - backend-worker - Background job processor (async tasks, scheduled jobs)
- frontend - Nginx serving the React SPA
- init-job - One-time job for database migrations (runs on install/upgrade)
- postgres (optional) - Bundled PostgreSQL instance
Download​
wget https://user:[email protected]/docker/definity-chart-0.85.0.tgz
tar xzvf definity-chart-*.tgz
Configure​
See values.yaml in the chart for more configuration options.
Postgres​
Use your own managed Postgres instance and set its URL in values.yaml (recommended).
Alternatively, enable the bundled Postgres in the chart:
- Installed via Helm pre-install hook (not managed by main chart lifecycle)
- Enable only during first installation
- Requires a persistent volume
Base Path​
To deploy Definity under a subpath (e.g., https://example.com/definity/), set the basePath value:
basePath: definity
This configures the frontend routing and backend API paths accordingly.
Install​
helm upgrade --install definity-app definity-chart
Verify​
export DEFINITY_HOST=http[s]://your-host[:port]
bash definity-chart/server_hello_world.sh
Login​
Open the Definity URL in your browser. The default credentials are:
- Username:
user - Password:
pass
Change these credentials after first login via the Settings page.
Maintenance​
Logs​
Backend services contain rotating log files.
NAMESPACE=namespace
# Enter the backend-log pod
kubectl exec -it svc/backend-log -n $NAMESPACE -- /bin/bash
# List available logs
ls -l logs/
# Example files:
# definity-server.log
# definity-server-errors.log
# Copy error log to local machine
CUR_DATE=$(date +%F)
kubectl cp -n $NAMESPACE backend-log-pod-name:logs/definity-server-errors.log ./definity-server-errors-${CUR_DATE}.log
# Collect all logs to local
bash collect_k8s_logs.sh $NAMESPACE
ls -l ./definity_logs
DB Dump​
Create a PostgreSQL dump file locally:
pg_dump -Fc -U postgres postgres > pg_db_dump_$(date +%F).custom
Create a dump file from inside a Kubernetes container:
kubectl exec svc/postgres -- pg_dump -Fc -U postgres postgres -f /tmp/pg_dump.custom
kubectl cp svc/postgres:/tmp/pg_dump.custom ./pg_db_dump_$(date +%F).custom
kubectl exec svc/postgres -- rm /tmp/pg_dump.custom
Restore the database from a dump file:
psql -c "drop schema public cascade"
psql -c "create schema public"
pg_restore -v -Fc -h localhost -d $DB_NAME --no-owner pg_db_dump_${CUR_DATE}.custom
OPTIONAL - Send Definity Anonymized DB dump​
Produces a pg_dump tarball with customer-identifying values redacted,
safe to share with Definity engineering for support or debugging. The
utility ships inside the Definity backend image — nothing to install.
Replace <namespace> with your deployment namespace, then run:
NAMESPACE=<namespace>
NAME=definity-anon-$(date +%Y%m%d-%H%M%S).tar.gz
MAX_RETRIES=5
for i in $(seq 1 $MAX_RETRIES); do
rm -f $NAME.gz $NAME
kubectl exec -n $NAMESPACE svc/backend-log -- bash -c "bash scripts/anonymize_db.sh | gzip" > $NAME.gz \
&& gunzip $NAME.gz && break
echo "Attempt $i/$MAX_RETRIES failed, retrying..."
[ $i -eq $MAX_RETRIES ] && echo "ERROR: transfer failed after $MAX_RETRIES attempts"
done
The loop automatically retries if the transfer is interrupted. When it
finishes, definity-anon-<timestamp>.tar.gz is in your current directory.
Send that file to Definity support.