cancel
Showing results for 
Search instead for 
Did you mean: 
  • 34 Views

chapter2 lab - Deploying Simple Applications - can't connect to postgres

I'm doing the ch02s07 lab, but can't get my todo-list app to connect to the DB.

Pod logs: Could not connect to database:error: password authentication failed for user "developer"

 

When I check my posgres pod (created from the postgres (ephemeral) template), I dont see the todo_list db.

 

Screenshot From 2024-12-19 10-25-17.pngScreenshot From 2024-12-19 10-26-13.png

Anyone see what I'm doing wrong?  Screenshot From 2024-12-19 10-27-58.pngScreenshot From 2024-12-19 10-28-29.png

0 Kudos
1 Reply
  • 11 Views

OK... what worked for me... editing the DeploymentConfig Environment Variables.

POSTGRESQL_USER, POSTGRESQL_PASSWORD, POSTGRESQL_DATABASE were created as secrets.  (the Secrets seem to match default values, so for example "sampledb" instead of "todo_list").

After manually setting values to :

POSTGRESQL_USER = developer

POSTGRESQL_PASSWORD = developer (not "test"  -- found correct password here: https://github.com/RedHatTraining/DO288-apps/blob/main/apps/deploy-review/todo-list/db.js)Screenshot From 2024-12-19 16-55-09.png

POSTGRESQL_DATABASE = todo_list

things seem to start work.

Hope it helps someone facing this error.

But would be interested to also hear if I was the only one seeing this. (that means I'm doing something incorrect)

0 Kudos
Join the discussion
You must log in to join this conversation.