将postgresql部署到kubenetes

时间:2020-06-03 09:27:03

标签: postgresql kubernetes

重现问题的步骤

  1. helm pull bitnami/postgresql
  2. tar -xf postgresql-8.4.3.tgz && cd postgresql
  3. 使用storageClass:“ local-path”,postgresqlPassword:root,postgresqlDatabase:test
  4. 更新values-production.yaml
  5. helm upgrade --install -f values-production.yaml postgresql .
  6. kubectl get all

我收到的结果:

  • postgresql-master正在运行
  • postgresql-slave没有运行

我期望的结果:

  • postgresql-master正在运行
  • postgresql-slave正在运行

2 个答案:

答案 0 :(得分:0)

请尝试使用oparator安装postgresql集群。 您可以使用 1. https://github.com/zalando/postgres-operator/blob/master/docs/quickstart.md#deployment-options 2. https://github.com/CrunchyData/postgres-operator

它们都是流行的postgresql运算符。 我想建议您使用crunchydata PGO。您可以轻松地从this

安装它

答案 1 :(得分:-1)

helm upgrade --install --debug -f values-production.yaml postgresql .

能否请您尝试调试和--dry-run?也请参阅本自述文件。

https://github.com/bitnami/charts/blob/master/bitnami/postgresql/README.md