@@ -71,26 +71,26 @@ kubectl describe postgresql acid-minimal-cluster
7171## Connect to PostgreSQL
7272
7373With a ` port-forward ` on one of the database pods (e.g. the master) you can
74- connect to the PostgreSQL database. Use labels to filter for the master pod of
75- our test cluster.
74+ connect to the PostgreSQL database from your machine . Use labels to filter for
75+ the master pod of our test cluster.
7676
7777``` bash
7878# get name of master pod of acid-minimal-cluster
79- export PGMASTER=$( kubectl get pods -o jsonpath={.items..metadata.name} -l application=spilo,cluster-name=acid-minimal-cluster,spilo-role=master)
79+ export PGMASTER=$( kubectl get pods -o jsonpath={.items..metadata.name} -l application=spilo,cluster-name=acid-minimal-cluster,spilo-role=master -n default )
8080
8181# set up port forward
82- kubectl port-forward $PGMASTER 6432:5432
82+ kubectl port-forward $PGMASTER 6432:5432 -n default
8383```
8484
85- Open another CLI and connect to the database. Use the generated secret of the
86- ` postgres ` robot user to connect to our ` acid-minimal-cluster ` master running
87- in Minikube. As non-encrypted connections are rejected by default set the SSL
88- mode to require:
85+ Open another CLI and connect to the database using e.g. the psql client.
86+ When connecting with the ` postgres ` user read its password from the K8s secret
87+ which was generated when creating the ` acid-minimal-cluster ` . As non-encrypted
88+ connections are rejected by default set the SSL mode to ` require ` :
8989
9090``` bash
9191export PGPASSWORD=$( kubectl get secret postgres.acid-minimal-cluster.credentials -o ' jsonpath={.data.password}' | base64 -d)
9292export PGSSLMODE=require
93- psql -U postgres -p 6432
93+ psql -U postgres -h localhost - p 6432
9494```
9595
9696## Defining database roles in the operator
0 commit comments