postgres/data/pgdata is not a valid data directory in kubernetes workload

8/28/2019

The workload 'datastore' inside our Kubernetes cluster has stopped working giving a CrashLoopBackOff error.

I have tried accessing logs for this pod and it gives the following details:

FATAL: "/var/lib/postgresql/data/pgdata" is not a valid data directory DETAIL: File "/var/lib/postgresql/data/pgdata/PG_VERSION" does not contain valid data. HINT: You might need to initdb.

Has anybody else faced this error before? What has suddenly caused this to happen and how can I go about fixing it?

Thanks

-- Peterbarr
google-cloud-platform
kubernetes
postgresql

0 Answers