简体   繁体   English

无法从 Kubernetes Metabase Pod 连接 Google Cloud SQL

[英]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.

相关问题 无法访问Google Cloud上公开的外部IP的Kubernetes Pod - Cannot access Kubernetes pods exposed external ip on google cloud 在 Google Cloud 中监控 Kubernetes Pod - Monitoring Kubernetes Pods in Google Cloud kubernetes:Pod无法连接到互联网 - kubernetes: pods cannot connect to internet Kubernetes Pods与Google Cloud中的部署 - Kubernetes Pods vs Deployments in Google Cloud 为什么在端口转发到代理且服务有效时,其他 Pod 无法通过 Kubernetes 代理和服务连接到 Cloud SQL? - Why can't other pods connect to Cloud SQL through Kubernetes proxy and service when portforwarding to the proxy and the service works? Kubernetes - 无法从 Kubernetes 集群内部连接到 Redis Pod - Kubernetes - Unable to connect to Redis Pods from inside Kubernetes Cluster 无法使用谷歌云在牧场主的 kubernetes 上的 Pod 之间进行通信? - Unable to communicate between pods on kubernetes on rancher using google cloud? 订阅 Google 云发布/订阅的 kubernetes pod 的多个副本 - Multiple replicas of a kubernetes pods subscribing to a Google cloud pub/sub 无法从已部署的Kubernetes NodeJS应用连接到Google MySQL - Cannot connect to Google MySQL from deployed Kubernetes NodeJS app 我如何从谷歌 kubernetes 引擎访问云 sql - how can i access cloud sql from google kubernetes engine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM