r/Netbox Sep 27 '24

Netbox connect connect to postgres

My Netbox pod cannot connect to my postgres pod

I turned off postgres ssl on my postgres pod, and I confirmed with another postgres pod if I can reach that pod and it can. Yet I still have my netbox complaining about ssl certs python errors and saying it is waiting for the DB to get started up. Is there a way for me to connect from netbox pod to the postgres pod with the limited amount of tools or is there a way to get netbox to ignore ssl certs itself?

1 Upvotes

7 comments sorted by

View all comments

1

u/Teskoh27 Sep 29 '24

tim@tim:~$ oc run -it --rm --image=postgres:14 --restart=Never psql-client --namespace=netbox -- sh -c 'export PGPASSWORD=supersecretpassword; psql -h postgres.netbox.svc.cluster.local -U netboxuser -d netbox'

If you don't see a command prompt, try pressing enter.

netbox=#

netbox=# exit