简体   繁体   English

RabbitMQ 作为 kubernetes 集群中的 pod

[英]RabbitMQ as pod in kubernetes cluster

This question has been asked in the past, but I did not manage to find clear answer.过去曾提出过这个问题,但我没有找到明确的答案。 Is that good practice to set up rabbit as a pod in Kubernetes cluster?在 Kubernetes 集群中将 rabbit 设置为 pod 是一种好习惯吗? We got ~7 pods in our cluster, and some queuing mechanism starts to be necessary.我们的集群中有大约 7 个 pod,并且开始需要一些排队机制。 First idea was to create pod for rabbit with persistent volume and service, and allow other pods to connect to it.第一个想法是为兔子创建具有持久卷和服务的 pod,并允许其他 pod 连接到它。 I'm not sure if that solution is correct.我不确定该解决方案是否正确。 Maybe it's better idea to set up rabbit on some remote server, as we did with database?也许最好在某个远程服务器上设置rabbit,就像我们对数据库所做的那样?

Pods represents any container group/binary on Kubernetes. Pods 代表 Kubernetes 上的任何容器组/二进制文件。 What is owning/managing those pods is important, is it a ReplicaSet, DaemonSet or a StatefulSet?拥有/管理这些 pod 是什么很重要,它是 ReplicaSet、DaemonSet 还是 StatefulSet? ReplicaSets are supposed to be stateless and a RabbitMQ borker is stateful . ReplicaSet 应该是无状态的,而 RabbitMQ borker 是有状态的。

You can deploy stateful workload on Kubernetes, but you should do it as a StatefulSet .您可以在 Kubernetes 上部署有状态工作负载,但您应该将其作为StatefulSet进行。 Here is an example RabbitMQ on Google Kubernetes Engine这是Google Kubernetes 引擎上的示例 RabbitMQ

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM