<p>I need to setup a RabbitMQ cluster with queue  mirroring enabled on all queues in Kubernetes.
The RabbitMQ plugin for kubernetes peer discovery only provides a clustering mechanism based on peer discovery , as the plugin name indicates.
But how do I enable queue mirroring and achieve HA , so that if pods a restarted for any reason or if I need to scale the Rabbitmq nodes , I can do it without any loss of messages.</p>

<p>Add a definitions.json file into your ConfigMap and ensure that your pods mount the file (in /etc/rabbitmq). In that file, specify all exchanges/queues, and have a policy defined for mirroring that would be applied to those exchanges/queues.</p>

<p>It may be easier to manually set this up and export the definitions file from a running RabbitMQ node.</p>

<p>This way - your cluster is all configured when started.</p>
