[Questions] Add RabbitMQ nodes on VMs join a RabbitMQ cluster on Kubernetes #13350
-
Community Support Policy
RabbitMQ version used4.0.5 Erlang version used27.2.x Operating system (distribution) usedRHEL 8.10 How is RabbitMQ deployed?Bitnami Helm chart rabbitmq-diagnostics status outputNode on Kubernetes:
Node on VMs:
Logs from node 1 (with sensitive values edited out)N/A Logs from node 2 (if applicable, with sensitive values edited out)No response Logs from node 3 (if applicable, with sensitive values edited out)No response rabbitmq.confConfig on Kubernetes
Config on VMs:
Steps to deploy RabbitMQ clusterKubernetes RabbitMQ: VM RabbitMQ: Steps to reproduce the behavior in questionSetup a RabbitMQ cluster on Kubernetes on a specific datacenter. Now you can connect to both sides, this is needed to be able to connect the 2 RabbitMQ clusters. And I think it is relevant that the RabbitMQ clusters/nodes on K8S do not reside on the same network as RabbitMQ on VMs. But they can connect to each other over ports 5673, 4369, 25673. advanced.configN/A Application codeN/A Kubernetes deployment fileNo response What problem are you trying to solve?We have a RabbitMQ cluster running on Kubernetes that we need to migrate to the a cluster running on VMs on a different datacenter tenant. This migration has to be performed without downtime. The idea was to setup RabbitMQ nodes on the VMs and have them join the RabbitMQ cluster on Kubernetes. We made sure the network connection from both sides is possible. Have all VMs node join the cluster on Kubernetes. Messages from our applications that use RabbitMQ will be send to a central Kubernetes service, which is pointing to the existing RabbitMQ cluster on Kubernetes. We setup a new service + endpoint on Kubernetes, which will point to the loadbalancer that is before the RabbitMQ cluster on VMs and thus directing the traffic to the new nodes. And then 1 by 1 remove the nodes that are running on Kubernetes when syncing of data is complete. The problem is, I cannot find any documentation stating that this combination of RabbitMQ on Kubernetes and RabbitMQ on VMs is possible. I would assume the RabbitMQ application is not different, but the config and peer discovery are very much different. I've tried joining 1 of the RabbitMQ node on VMs to join the RabbitMQ cluster on Kubernetes but without success:
I've checked the Erlang cookie as that is the main culprit, but that seems to be exactly the same cookie value. Logging does not show anything, so I'm at the moment clueless on what is going on. And if this setup is even possible. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
@eriktroost070 RabbitMQ nodes do not know if they are running on Kubernetes or in a VM. The important parts are well documented in the Clustering and Cluster Formation guides:
The CLI message includes several clues and several suggestions, of which you seemingly have verified just one. The node your are clustering with will log a message when the cookie is different. Rethink the Entire StrategyThis approach to upgrades is known as "grown-then-shrink" on our team and it is explicitly recommended against unless you have a lot of experience with such migrations. It is easy to get wrong. A Blue-Green Deployment is how clusters should be migrated from one infrastructure to the other. Tanzu RabbitMQ users can also use the Warm Standby Replication feature for migration, even though it was not really built for that. |
Beta Was this translation helpful? Give feedback.
@eriktroost070 RabbitMQ nodes do not know if they are running on Kubernetes or in a VM.
The important parts are well documented in the Clustering and Cluster Formation guides:
The CLI message includes several clues and several suggestions, of which you seemingly have verified just one. The node your are clustering with will log a message when the cookie is different.
Rethink the Entire Strategy
This approach to upgrades is known as "grown-then-shrink" on our team and it is explicitly recommended against unless you have a lot of experience with such migrations.…