Phoenix can be deployed on Kubernetes with either SQLite backed by a persistent disc or with PostgreSQL.
You must have a working Kubernetes cluster accessible via kubectl
.
SQLite with a StatefulSet
Clone the Arize-Phoenix repository:
git clone https://github.com/Arize-ai/phoenix.git
From the repository root, apply the kustomize
configuration for SQLite:
kubectl apply -k kustomize/base
This will yield a single node deployment of Phoenix with a local SQLite.
Copy the manifest below into a file named phoenix.yaml
.
# phoenix.yaml
apiVersion: v1
kind: Service
metadata:
labels:
app: phoenix
name: phoenix
spec:
ports:
- port: 443
protocol: TCP
targetPort: 6006
selector:
app: phoenix
type: ClusterIP
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: phoenix
namespace: phoenix
spec:
replicas: 1
selector:
matchLabels:
app: phoenix
template:
metadata:
# Assume k8s pod service discovery for prometheus
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "9090"
prometheus.io/scrape: "true"
labels:
app: phoenix
spec:
containers:
- args:
- -m
- phoenix.server.main
- serve
command:
- python
env:
- name: PHOENIX_WORKING_DIR
value: /mnt/data
# The version of phoenix you want should be used here
image: docker.io/arizephoenix/phoenix:version-4.0.0
ports:
- containerPort: 6006
- containerPort: 4317
- containerPort: 9090
volumeMounts:
- mountPath: /mnt/data
name: phoenix
volumeClaimTemplates:
- metadata:
name: phoenix
spec:
resources:
requests:
storage: 8Gi
Apply the manifest:
kubectl apply -f phoenix.yaml
PostgreSQL
Manifests for PostgreSQL tend to be complex, so we recommend using kustomize
.
Clone the Arize-Phoenix repository:
git clone https://github.com/Arize-ai/phoenix.git
From the repository root, apply the kustomize
configuration for PostgreSQL:
kubectl apply -k kustomize/backends/postgres
This will yield a single node deployment of Phoenix pointed to a remote PostgreSQL.
Last updated