AnsweredAssumed Answered

MapR Kubernetes Fabric

Question asked by thbeh on May 7, 2018
Latest reply on May 8, 2018 by mkieboom

Hi, great stuff that Martijn Kieboom wrote - Kubernetes Tutorial: How to Install and Deploy Applications at Scale on K8s - Part 1 of 3.

Tried following it on my MapR and kubernetes cluster. All work fine except on running the postgres container in Part 3. Looking at the pod's logs, it shows that container was not started as postgres was not initiated properly.

 

###################################################################
######## Postgres configuration details ########
###################################################################
PGDATA_LOCATION: /postgres
PG_DB: mapr
PG_GROUP: mapr
PG_USER: mapr
PG_GID: 5000
PG_UID: 5000
Running Postgres launch script now.
The files belonging to this database system will be owned by user "mapr".
This user must also own the server process.
The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".
initdb: directory "/postgres" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/postgres" or run initdb
with an argument other than "/postgres".
waiting for server to start....FATAL: "/postgres" is not a valid data directory
DETAIL: File "/postgres/PG_VERSION" is missing.
stopped waiting
pg_ctl: could not start server
Examine the log output.
createuser: could not connect to database postgres: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
createdb: could not connect to database template1: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
pg_ctl: PID file "/postgres/postmaster.pid" does not exist
Is server running?
Postgres server running.
FATAL: "/postgres" is not a valid data directory
DETAIL: File "/postgres/PG_VERSION" is missing.

 

Anything I missed?

Outcomes