Kubernetes中部署数据库的最佳实践。

huangapple go评论118阅读模式
英文:

Best Practices for Deploying a Database in Kubernetes

问题

下午好!

我对Kubernetes相对新手。我想向您请教一些知识!在Kubernetes上部署PostgreSQL或MySQL以供生产使用的最佳方法是什么?建议一些文章或资源,我将非常感激。

我只看到有关如何部署PostgreSQL开发环境的示例和信息,关于如何设置生产环境的信息很少。谢谢!

英文:

Good afternoon!

I am relatively new to Kubernetes. I would like to ask for your help in knowledge! What is the best way to deploy Postgresql or MySql in kubernetes for production? Suggest articles or resources, I would be very grateful.

I only see examples and information on how to deploy Postgresql dev, very little information on how to set up a production environment. Thank you!!!

答案1

得分: 1

我们一直在K8s上运行多个数据库,比如Elasticsearch、Redis和一些消息代理,所以你肯定可以在生产环境中运行。

现在我建议选择运算符管理的数据库部署。在生产环境中,你可能期望有高可用性和数据复制,你可能不太了解其中的细节。运算符以简单的话语管理部署并执行所需的操作。

这里是关于PostgreSQL运算符的文档,其中详细介绍了CRD有状态集和卷如何一起工作。

Zalando PostgreSQL运算符:https://github.com/zalando/postgres-operator

可用运算符的比较:https://blog.palark.com/comparing-kubernetes-operators-for-postgresql/

英文:

We have been running multiple databases on K8s like Elasticsearch, Redis some message brokers so it you can definitely run on Production.

Now i would suggest going with the Operator managed Database deployment. As on Production, you might be expecting an HA, data replication which you won't be having an idea in depth. Operator manages the deployment in simple words and do the operation as need.

Here is the document to follow for postgres operator is has the details on how CRD, stateful sets volume work together.

Zalando postgres-operator : https://github.com/zalando/postgres-operator

Comparision between available operator : https://blog.palark.com/comparing-kubernetes-operators-for-postgresql/

huangapple
  • 本文由 发表于 2023年3月9日 15:11:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/75681436.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定