Assign each state store a specific job
Open WebUI receives its `DATABASE_URL` from a Kubernetes Secret and connects to PostgreSQL. The database uses a 10 GiB ReadWriteOnce claim and the pgvector-enabled Postgres image. `VECTOR_DB=pgvector` selects Open WebUI’s vector-store integration; this is not a custom model pipeline in the repository.
Redis is configured as the WebSocket manager and cache. It coordinates the interface’s real-time connections, while PostgreSQL is the durable application database. Redis has no persistent volume in this manifest, so its contents should be treated as replaceable rather than as the only copy of user data.
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: llm-secrets
key: DATABASE_URL
- name: VECTOR_DB
value: pgvector
- name: REDIS_URL
valueFrom:
secretKeyRef:
name: llm-secrets
key: REDIS_URL
- name: WEBSOCKET_MANAGER
value: redisDistinguish durable volumes from pod-local files
PostgreSQL, Prometheus, and Grafana each have a 10 GiB ReadWriteOnce claim. Their Deployments use `Recreate`, avoiding two simultaneous pods trying to mount the same single-node volume during an update. This is a practical fit for the available storage class, but each service remains a single replica and can be unavailable during replacement.
Open WebUI’s `/app/backend/data` and vLLM’s model cache instead use `emptyDir`. Those directories disappear with their pods. In particular, local uploads are not shared across Open WebUI replicas and can be lost when a pod is recreated; the production notes suggest object storage for this reason. Each vLLM replica also downloads its own model cache.
Scaling and persistence are separate problems
A Service makes a group of pods reachable, but it does not copy files between them. The Open WebUI HPA can add replicas, while its local file directory remains private to each pod. Conversely, the PostgreSQL claim preserves its volume across pod replacement but does not provide replication, backups, or failover.
The design is useful for learning service boundaries, not a complete durability strategy. A production system would define backup and restore, shared or object-backed file storage, database availability, and a clear Redis recovery policy before increasing the replica count.