[英]Cannot Connect Google Cloud SQL from Kubernetes Metabase Pods
I have one Kubernetes cluster which has Metabase running.我有一个运行 Metabase 的 Kubernetes 集群。 I am using the Metabase official helm configuration.
我正在使用 Metabase 官方掌舵配置。
But when I connect to the SQL proxy from Kubernetes it always says Connections could not be acquired from the underlying database!但是当我从 Kubernetes 连接到 SQL 代理时,它总是说无法从底层数据库获取连接!
I have added the Kubernetes pod IP and Nginx IP in cloud SQL proxy.我已经在云 SQL 代理中添加了 Kubernetes pod IP 和 Nginx IP。
Looks like you have to modify the deployment variables to point to your Google Cloud SQL database.看起来您必须修改部署变量以指向您的 Google Cloud SQL 数据库。
This may vary depending on whether you are using PostgreSQL or MySQL for your Google Cloud SQL database.这可能会有所不同,具体取决于您为 Google Cloud SQL 数据库使用的是 PostgreSQL 还是 MySQL。
With PostgreSQL you can specify a connectionURI like this:使用 PostgreSQL,您可以像这样指定 connectionURI:
postgres://user:password@host:port/database?ssl=true&sslmode=require&sslfactory=org.postgresql.ssl.NonValidatingFactory"
With PostgreSQL and MySQL you can specify user/password/host/port.使用 PostgreSQL 和 MySQL,您可以指定用户/密码/主机/端口。
To change these you can edit the deployment:要更改这些,您可以编辑部署:
kubectl -n <your-namespace> edit deployment metabase
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.