DevOps Buzz
Search…
⌃K

Cheat Sheet

Cluster Formation and Peer Discovery

If you have a Kubernetes cluster with node auto scaling, nodes will be added and removed dynamically, in this case RabbitMQ must have the following plugins:
/etc/rabbitmq/enabled_plugins
[
rabbitmq_shovel,
rabbitmq_shovel_management,
rabbitmq_federation,
rabbitmq_federation_management,
rabbitmq_top,
rabbitmq_peer_discovery_k8s,
rabbitmq_stomp,
rabbitmq_web_stomp,
rabbitmq_consistent_hash_exchange,
rabbitmq_management,
rabbitmq_peer_discovery_k8s
].
/etc/rabbitmq/rabbitmq.conf
## Clustering
cluster_formation.peer_discovery_backend = rabbit_peer_discovery_k8s
cluster_formation.k8s.host = kubernetes.default.svc.cluster.local
cluster_formation.k8s.address_type = hostname
cluster_formation.node_cleanup.interval = 10
# Set to false if automatic cleanup of absent nodes is desired.
# This can be dangerous, see http://www.rabbitmq.com/cluster-formation.html#node-health-checks-and-cleanup.
cluster_formation.node_cleanup.only_log_warning = true
cluster_partition_handling = autoheal
management.load_definitions = /etc/definitions/definitions.json
## Memory-based Flow Control threshold
vm_memory_high_watermark.absolute = 4096MB

References