Hello, Do anybody selfhost phoenix in Kubernetes deployments with a remote PostgreSQL DB? ( Selfhost and also in Kubernetes and postgres remote )
Yes, Phoenix can be self-hosted in Kubernetes with a remote PostgreSQL database. You need to set the PHOENIX_SQL_DATABASE_URL environment variable in your deployment to point to your remote PostgreSQL instance (e.g., postgresql://user:password@host:port/dbname). The official documentation provides Kubernetes manifests and kustomize overlays for both SQLite and PostgreSQL backends, and recommends using PostgreSQL for production or multi-user scenarios. Migrations are handled automatically at startup, but ensure your database URL is correct and that the required dependencies (like asyncpg) are installed in your container image. For more details and example manifests, see the Kubernetes deployment guide and configuration docs (docs.arize.com, GitHub deployment docs, configuration).Would you like a step-by-step example manifest or troubleshooting tips?Sources:
- Kubernetes Deployment Options
- Phoenix Kubernetes Deployment Docs
- Phoenix Configuration
- Persistence Docs
- Slack Example
馃挕聽Hint: Mention RunLLM in the thread for followups.
kustomize is not helpful for me 馃槥 in my setup.
Not quite sure where you are stuck
Start here https://github.com/Arize-ai/phoenix/blob/main/kustomize/base/phoenix.yaml And add the Postgres overlay
To create a Kubernetes manifest for Phoenix using PostgreSQL, start with the base manifest and add the Postgres overlay. The recommended approach is to use kustomize overlays provided in the Phoenix repo. Clone the repo and apply the Postgres overlay: LBKSgit clone https://github.com/Arize-ai/phoenix.git kubectl apply -k kustomize/backends/postgresLBKSThis will deploy Phoenix configured to use a remote PostgreSQL database. You can customize the PHOENIX_SQL_DATABASE_URL in the overlay as needed (kustomize/base/phoenix.yaml, kustomize/backends/postgres/patches.yaml). For manual editing, set the PHOENIX_SQL_DATABASE_URL environment variable in your manifest to your Postgres connection string.Would you like a full example manifest YAML?Sources:
- Phoenix Kubernetes Deployment Docs
- kustomize/backends/postgres/patches.yaml
- kustomize/README.md
馃挕聽Hint: Mention RunLLM in the thread for followups.
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: phoenix
spec:
replicas: 1
selector:
matchLabels:
app: phoenix
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "9090"
prometheus.io/scrape: "true"
labels:
app: phoenix
spec:
containers:
- name: phoenix
image: arizephoenix/phoenix::latest
args::
- -m
- phoenix.server.main
- serve
command:
- python
env:
- name: PHOENIX_PORT
value: "6006"
- name: PHOENIX_SQL_DATABASE_URL
value: "postgresql:://postgres::postgres@postgres::5432/postgres"
ports::
- containerPort: 6006
- containerPort: 4317
- containerPort: 9090```You will also need a Postgres deployment/service, or point PHOENIX_SQL_DATABASE_URL to your remote instance. Adjust credentials and host as needed.Would you like a manifest for the Postgres database as well?Sources:
- kustomize/base/phoenix.yaml
- kustomize/backends/postgres/patches.yaml
馃挕聽Hint: Mention RunLLM in the thread for followups.
