Restart a cluster best practice

 Instructions

To initiate a rolling restart for the HiveMQ cluster, change something in the HiveMQCluster Custom Resource and, once the HiveMQ Operator notices the change in the HiveMQCluster Custom Resource, it will restart all HiveMQ pods.

The easiest is to change something without breaking anything is to change something in the .confOverride template in a way that doesn't change the semantics, for example, change this:

<discovery> <extension/> </discovery>

to this:

<discovery><extension/></discovery>

Once you save/apply the change, the HiveMQ operator should add the new “surge” pod, one-by-one, terminate and restart all hivemq-pods, and terminate the “surge” pod.

To get the custom resource, you can use the following command:

kubectl get hivemq-clusters kubectl get hivemq-cluster ${my-hivemq-cluster-name}