I am facing this error from kubernetes cluster. Though it works perfectly from my local server. Here is my application.yml of SpringBoot App
spring:
datasource: dataSourceClassName: org.postgresql.ds.PGPoolingDataSource url: jdbc:postgresql://${POSTGRES_HOST}:5432/test_db databaseName: test_db poolName: SpringBootHikariCP username: ${POSTGRES_USER} password: ${POSTGRES_PASSWORD} testWhileIdle: true validationQuery: SELECT 1 jpa: database-platform: org.hibernate.dialect.PostgreSQL82Dialect openInView: false show_sql: true generate-ddl: true hibernate: ddl-auto: update naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy use-new-id-generator-mappings: true properties: hibernate.cache.use_second_levelt_cache: false hibernate.cache.use_query_cache: false hibernate.generate_statistics: true hibernate.hbm2ddl.auto: validate Here is my Hikari configuration.
HikariConfig config = new HikariConfig(); config.setDataSourceClassName(dataSourceClassName); config.addDataSourceProperty("url", url); config.addDataSourceProperty("user", user); config.addDataSourceProperty("password", password); return new HikariDataSource(config); I have checked DB connectivity of kubernetes without Hikari and it works perfectly. So there is no issue with connectivity. Please help me regarding the issue. I am stuck with this for couple of days. Thank you