Issue while deploying keycloak on kubernetes using postgresql

HI,
I am trying to deploy keycloak on kubernetes cluster with postgresql (AWS RDS instance). However my pods are failing with below error:

“ERROR: Failed to start server in (production) mode
2022-06-23 16:40:14,895 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to obtain JDBC connection
2022-06-23 16:40:14,895 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: No suitable driver found for jdbc:postgresql://keycl.c657irl4zbya.us-east-1.rds.amazonaws.com:5432/keycloakdbtest
2022-06-23 16:40:14,895 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) For more details run the same command passing the ‘–verbose’ option. Also you can use ‘–help’ to see the details about the usage of the particular command.”

Here is my deployment file : keycloak deploy - Pastebin.com

You need to set db-driver at configuration phase with kc.sh start --build --db=postgres or use the --auto-build.

See Running Keycloak in a container - Keycloak for other settings when running keycloak under a container.

thanks @weltonrodrigo. I tried with the auto build option and getting below error now.

“[org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to obtain JDBC connection
2022-06-23 17:56:00,463 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: The connection attempt failed.
2022-06-23 17:56:00,464 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: connect timed out
2022-06-23 17:56:00,464 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) For more details run the same command passing the ‘–verbose’ option. Also you can use ‘–help’ to see the details about the usage of the particular command.”

I am running postgresql version 13. Is that version supported ?

It’s supported.

The message talks about connection time out. I’d try opening a shell inside keycloak’s container to test the connectivity between the pod and the database.