Trying to deploy postgres in kubernetes (https://github.com/paunin/PostDock/tree/master/k8s/example2-single-statefulset),
- Used pgpool-II(2 replicas) along with 1 postgres-master pod & 2 slave pods.
kubectl get pods -n postgres
NAME READY STATUS RESTARTS AGE
psql-db-pgpool-8****c-7**k 1/1 Running 0 35d
psql-db-pgpool-8****c-m**5 1/1 Running 0 35d
psql-db-node-0 1/1 Running 0 35d
psql-db-node-1 1/1 Running 0 35d
psql-db-node-2 1/1 Running 0 20h
- Created a user "test" from the master postgres db with postgres user.
- When trying to connect from within the pods(node-0), the authentication is successful, with user "test".
root@postgres-db-node-0:/# psql -h localhost postgres -U test
psql (11.4 (Debian 11.4-1.pgdg90+1))
Type "help" for help.
postgres=> \l
- When trying to connect with NodePort IP & NodePort of the kubernetes cluster, the new user "test" fails authentication with pool_passwd file does not contain an entry for "test"
psql -h NODE_IP -U test -d postgres --port NODE_PORT
psql: FATAL: md5 authentication failed
DETAIL: pool_passwd file does not contain an entry for "test"
- Logged in to the pgpool-II pod to find out
root@psql-db-pgpool-8****c-7**k:/# cat /usr/local/etc/pool_passwd
user1:md5****422f
replica_user:md5****3
The new user "test" created at the database is not reflected at the pgpool. Does it work this way, to create & update pgpool everytime a new user is created? Or am I missing something for this user update.