DevOps Buzz
Search…
Bash / Shell
Bitbucket
Distros
Elasticsearch
General
Guidelines / Standards
microk8s
Prometheus
RabbitMQ
VirtualBox
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
1
[
2
rabbitmq_shovel,
3
rabbitmq_shovel_management,
4
rabbitmq_federation,
5
rabbitmq_federation_management,
6
rabbitmq_top,
7
rabbitmq_peer_discovery_k8s,
8
9
rabbitmq_stomp,
10
rabbitmq_web_stomp,
11
12
rabbitmq_consistent_hash_exchange,
13
rabbitmq_management,
14
rabbitmq_peer_discovery_k8s
15
16
].
Copied!
/etc/rabbitmq/rabbitmq.conf
1
## Clustering
2
cluster_formation.peer_discovery_backend = rabbit_peer_discovery_k8s
3
cluster_formation.k8s.host = kubernetes.default.svc.cluster.local
4
cluster_formation.k8s.address_type = hostname
5
cluster_formation.node_cleanup.interval = 10
6
# Set to false if automatic cleanup of absent nodes is desired.
7
# This can be dangerous, see http://www.rabbitmq.com/cluster-formation.html#node-health-checks-and-cleanup.
8
cluster_formation.node_cleanup.only_log_warning = true
9
cluster_partition_handling = autoheal
10
11
management.load_definitions = /etc/definitions/definitions.json
12
13
## Memory-based Flow Control threshold
14
vm_memory_high_watermark.absolute = 4096MB
Copied!

References