Running databases in containers
PostgreSQL and Redis are common in Kubernetes: use StatefulSet (or operators) for stable network IDs and PersistentVolumeClaims for data. Ephemeral containers lose data on restart—PVCs survive Pod rescheduling. Prefer managed databases when you lack DBA capacity; self-hosted needs backups, upgrades, and connection pooling (PgBouncer).