I am looking into a high availability scenario for the operator. Consider that one node goes down, what happens to the data? I know that one of the DB pods is primary and the others secondary. Is this a concept that was created to provide a high availability solution? How can I ensure a failover design that can move the data, storage etc to another instance (or node), ensuring no data loss? Or is it a feature of the operator that once the primary DB pod goes down, another takes its place as the primary? I would imagine rack awareness, where each node is in a different region can be a good alternative.
PS: I am very new to the operator, so apologies if I have understood this wrong. Any suggestion or information is appreciated.
Operator has an “anti-affinity” rules which you can specify to force nodes to be located in separate locations
See for example
https://github.com/percona/percona-xtradb-cluster-operator/blob/master/deploy/cr.yaml
affinity:
section