【发布时间】:2021-04-14 15:31:00
【问题描述】:
我正在尝试针对 kubernetes 上的 postgres 数据库运行 flyway docker image 7.3.2:
当我运行作业时,我的输出是:
Flyway Community Edition 7.3.2 by Redgate
ERROR:
Unable to obtain connection from database (jdbc:postgresql://xxx.eu-west-2.rds.amazonaws.com:5432/xxx flyway.user=postgres flyway.password=****************) for user 'null': The server requested password-based authentication, but no password was provided.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL State : 08004
Error Code : 0
Message : The server requested password-based authentication, but no password was provided.
Caused by: org.postgresql.util.PSQLException: The server requested password-based authentication, but no password was provided.
它输出的设置是正确的,应该可以启用连接。
我通过一个配置映射传入我的flyway.conf:
apiVersion: v1
kind: ConfigMap
metadata:
name: flyway-configmap
data:
flyway.conf:
flyway.url=jdbc:postgresql://xxx.eu-west-2.rds.amazonaws.com:5432/xxx
flyway.user=postgres
flyway.password=xxx
谁能帮我解决我做错了什么?
【问题讨论】:
标签: postgresql kubernetes flyway configmap