Hi there! 
I can help you troubleshoot this PostgreSQL connection issue with Camunda Identity in your self-managed deployment. This is a common issue that typically relates to configuration or network connectivity problems.
Classification
This is a Problem - your Identity service is failing to start due to a database connection issue.
Troubleshooting Steps
Based on the error message Connection to camunda-platform-identity-postgresql:5432 refused, here are the key areas to investigate:
1. Verify Database Configuration
First, check your values.yaml configuration. Are you using the internal PostgreSQL (Bitnami sub-chart) or an external database?
For internal PostgreSQL:
identityPostgresql:
enabled: true
For external PostgreSQL:
identityPostgresql:
enabled: false
identity:
externalDatabase:
enabled: true
host: "your-postgres-host"
port: 5432
username: "postgres"
existingSecret: "camunda-psql-db"
existingSecretKey: "password"
database: "identity"
2. Check Pod and Service Status
Verify that both the PostgreSQL pod and service are actually running and accessible:
# Check PostgreSQL pod status
kubectl get pods | grep postgresql
# Check if the service exists and has endpoints
kubectl get svc camunda-platform-identity-postgresql
kubectl get endpoints camunda-platform-identity-postgresql
3. Test Network Connectivity
From within the Identity pod, test connectivity to PostgreSQL:
# Get the Identity pod name
kubectl get pods | grep identity
# Exec into the Identity pod and test connection
kubectl exec -it <identity-pod-name> -- sh
# Inside the pod, try:
nc -zv camunda-platform-identity-postgresql 5432
# or
telnet camunda-platform-identity-postgresql 5432
4. Check Detailed Logs
Get more detailed logs from the Identity pod:
kubectl logs <identity-pod-name> --previous
kubectl describe pod <identity-pod-name>
5. Verify Kubernetes Secrets
If using external database, ensure the secret exists:
kubectl get secret camunda-psql-db -n <your-namespace>
kubectl describe secret camunda-psql-db -n <your-namespace>
6. Common Issues with Helm Chart 12.3.0
- Ensure the database name matches what Identity expects (usually
identity)
- Check that the PostgreSQL user has proper permissions
- Verify the PostgreSQL service is in the same namespace as Identity
Next Steps
Could you please share:
- Your relevant
values.yaml configuration (sanitized)
- Output of
kubectl get pods,svc | grep postgres
- Full Identity pod logs:
kubectl logs <identity-pod-name>
This will help me provide more specific guidance for your setup.
References
Let me know what you find, and I’ll help you get this resolved! 