Stale PVCs retain outdated credentials after PostgreSQL redeployment
warningconfigurationUpdated Apr 13, 2025(via Exa)
Technologies:
How to detect:
When PostgreSQL StatefulSet is deleted and recreated (e.g., via ArgoCD application deletion), associated PVCs are not automatically deleted and retain old authentication credentials. This causes authentication failures in web pods when connecting to the recreated PostgreSQL instance.
Recommended action:
1) Delete existing PVC before recreating the Langfuse installation to clear stale credentials. 2) Configure persistentVolumeClaimRetentionPolicy with enabled: true and whenDeleted: Delete under postgresql.primary to ensure PVCs are automatically deleted when parent StatefulSet is removed. 3) Test PostgreSQL authentication via psql in the running pod to verify credentials after recreation.