postgres-statefulset-1 pod: CrashLoopBackOff soon after deployment
In the postgres-statefulset-1 pod, the following message is shown:
pg_basebackup: error: connection to server at "postgres-statefulset-0.postgres-service"
(10.42.0.6), port 5432 failed: FATAL: password authentication failed for user
"replication"
Cause
The user replication that is referenced in the message is created by the
database initialization program (which is the db-migrate Kubernetes Job), but
db-migrate was not run yet.
Solution
The db-migrate job is deployed through the
controlplane-operator-controller-manager pod in some order. However, if some
resources that are needed by the controlplane-operator-controller-manager to
complete this action are not available, it cannot proceed further. In most cases, this error
resolves on its own. However, after a long period of time, if this error persists, check the
controlplane-operator-controller-manager pod for the root cause.