Make sure to have the MapR Volume Driver for Kubernetes installed and running on your Kubernetes environment.
# Change the MapR specific parameters in the yaml file to reflect your MapR cluster configuration
kubectl create -f mapr-k8-postgres-part1-volumedriver.yaml
# Change the MapR and Postgres specific parameters in the yaml file to reflect your MapR & Postgres configuration
kubectl create -f mapr-k8-postgres-part2-container.yaml
# Install psql client on any other machine
yum install -y postgresql
# Use psql client to connect to the database server (username/password: mapr/mapr)
psql -U mapr -h k8snode01 -p 30003
CREATE SCHEMA test;
CREATE TABLE test.test (coltest varchar(20));
insert into test.test (coltest) values ('It works!');
SELECT * from test.test;
git clone https://github.com/mkieboom/mapr-k8-postgres
cd mapr-k8-postgres
By modifying the Dockerfile, eg:
vi Dockerfile
ENV PGDATA_LOCATION /postgres
ENV PG_DB mapr
ENV PG_GROUP mapr
ENV PG_USER mapr
ENV PG_PWD mapr
ENV PG_UID 5000
ENV PG_GID 5000
docker build -t mkieboom/mapr-k8-postgres .
Content type
Image
Digest
Size
110.4 MB
Last updated
almost 8 years ago
docker pull mkieboom/mapr-k8-postgres