...
Code Block language bash kubectl ns create <namespace name>
Code Block language bash kubectl ns <namespace name created by you in step 1>
Code Block language bash helm repo add bitnami https://charts.bitnami.com/bitnami
create
postgres_values.yaml
to deploy PostgresCode Block language yaml global: storageClass: "rook-ceph-block" postgresql: auth: password: password postgresPassword: password username: admin image: registry: docker.io repository: bitnami/postgresql tag: 11.13.0-debian-10-r40 debug: true primary: initdb: scriptsConfigMap: ese-db-init postgresqlConfiguration: hugePages: "off" hugePages: off listenAddresses: "*" resources: limits: hugepages-2Mi: 500Mi requests: memory: 256Mi cpu: 250m extraVolumeMounts: - mountPath: /hugepages-2Mi name: hugepage-2mi extraVolumes: - name: hugepage-2mi emptyDir: medium: HugePages-2M networkPolicy: enabled: true
Create the
configMap
ese-db-init
(it will contain theese-db-init.sql
script, that should create tables in the database and insert necessary data for the test)Code Block language bash kubectl create configmap ese-db-init --from-file ese-db-init.sql
Code Block language bash helm upgrade postgres --install postgresbitnami/postgresql --fvalues postgres_values.yaml bitnami/postgresql
kubectl get pods (check the status of the pod it should be running)
if the error is observed then check the pod logs
connect Postgres pod using the following command to verify the connectio
Code Block psql --host 127.0.0.1 -U postgres -d postgres -p 5432
execute
\l
to list down the databases,\c <db name>
to connect database, and\dt
for listing down the tables;
...