Description:
Trying to connect to my Postgres database. Ideally, it’d be nice if port forwarding would allow me to connect to the service on localhost, but for now, just trying to stick to the instructions to get a basic shell.
I’m running on k3d and had the same issues on GCP
Steps to Reproduce:
- PGBOUNCER_URI=$(kubectl -n postrgers-operator get secrets dashboard-v2-6-0-pguser-grafana -o jsonpath=‘{.data.pgbouncer-uri}’ | base64 --decode)
- kubectl run -i --rm --tty pg-client --image=perconalab/percona-distribution-postgresql:16 --restart=Never – psql $PGBOUNCER_URI
psql: error: connection to server at "dashboard-v2-6-0-pgbouncer.postgres-operator.svc" (10.43.128.30), port 5432 failed: FATAL: no such user
connection to server at "dashboard-v2-6-0-pgbouncer.postgres-operator.svc" (10.43.128.30), port 5432 failed: FATAL: SSL required
pod "pg-client" deleted
pod default/pg-client terminated (Error)
echo $PGBOUNCER_URI
postgresql://grafana:secret@dashboard-v2-6-0-pgbouncer.postgres-operator.svc:5432/dashboard
Version:
2.6.0
Logs:
kubectl -n postgres-operator logs service/dashboard-v2-6-0-pgbouncer
s
2025-06-05 20:32:51.376 UTC [8] LOG S-0x5555556b5c70: dashboard/_crunchypgbouncer@10.43.233.47:5432 new connection to server (from 10.42.0.15:49436)
2025-06-05 20:32:51.400 UTC [8] LOG S-0x5555556b5c70: dashboard/_crunchypgbouncer@10.43.233.47:5432 SSL established: TLSv1.3/TLS_AES_256_GCM_SHA384/ECDH=prime256v1
2025-06-05 20:32:51.444 UTC [8] LOG C-0x55555569a7b0: dashboard/(nouser)@10.42.0.26:35552 login failed: db=dashboard
2025-06-05 20:32:51.444 UTC [8] LOG C-0x55555569a7b0: dashboard/(nouser)@10.42.0.26:35552 closing because: no such user (age=0s)
2025-06-05 20:32:51.444 UTC [8] LOG S-0x5555556b5c70: dashboard/_crunchypgbouncer@10.43.233.47:5432 closing because: client disconnect before everything was sent to the server (age=0s)
2025-06-05 20:32:51.444 UTC [8] WARNING C-0x55555569a7b0: dashboard/(nouser)@10.42.0.26:35552 pooler error: no such user
Expected Result:
An psql shell
Actual Result:
errors on user auth and/or SSL Issues?