【问题标题】:Multiple Database in a postgres cluster on Kubernetes?Kubernetes 上的 postgres 集群中的多个数据库?
【发布时间】:2021-01-16 07:48:54
【问题描述】:

是否可以在具有 Crunchydata (postgres) 的集群中拥有多个数据库? 当我使用“pgo create cluster”命令创建集群时,我只能指定一个数据库。

 -d, --database string                       If specified, sets the name of the initial database that is created for the user. Defaults to the value set in the PostgreSQL Operator configuration, or if that is not present, the name of the cluster

但我每个集群需要多个数据库,我找不到任何官方方法来创建它们。

另一个问题:如何找到登录 PGOAmin Web 的“超级用户”用户名和密码?

非常感谢。

【问题讨论】:

  • 超级凭证通常由运营商在创建集群时生成。您可以尝试查看创建集群后在 Kubernetes 中添加了哪些 ConfigMap 和 Secret。您将在其中之一中找到凭据。 PS,我没用过cruchydata的算子。我用的是 Zalando 的那个。
  • 感谢您的回复。我已经尝试了集群命名空间和 operator 命名空间中的所有秘密,但它们都没有奏效。
  • access.crunchydata.com/documentation/postgres-operator/3.5.2/… 找到这个。看起来可以解决您的问题
  • 您找到创建多个数据库的答案了吗?我也在寻找答案
  • 这里有同样的问题:我们如何“正式”将数据库添加到集群中?我们可以使用 psql,但是在 psql 中创建的 db 会被集群备份吗?

标签: postgresql kubernetes


【解决方案1】:

这可能很有用,但它表示:

“将每个数据库都放在自己的位置可能更有意义 集群,如果你想让它们分布在你的 Kubernetes 上 拓扑。”

https://github.com/CrunchyData/postgres-operator/issues/2655

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-10-17
    • 2019-05-13
    • 1970-01-01
    • 2016-11-24
    • 2021-09-14
    • 2016-03-19
    • 1970-01-01
    相关资源
    最近更新 更多