Migrate to Primary Switchover on Graceful Shutdown
The MariaDB Enterprise Operator 26.06 introduces a new feature: Primary Switchover on Graceful Shutdown. This feature is enabled by default and automatically triggers a primary switchover when a primary Pod is gracefully terminated (e.g., during a node drain).
If you are upgrading from a version prior to 26.06 and wish to maintain the previous behavior (i.e., you do not want switchovers to happen automatically on graceful shutdown), you must update your MariaDB Custom Resources (CRs).
Migration Steps
Upgrade the CRDs: First, upgrade the MariaDB Enterprise Operator CRDs to version 26.06 or later to make the new configuration fields available. Please refer to the installation guide for detailed instructions on upgrading via Helm.
Update MariaDB CRs: After updating the CRDs, edit the
specof all yourMariaDBCustom Resources to explicitly disable the feature. This ensures the new behavior is not triggered once the operator controller is upgraded. Add the following configuration underspec.replication.primary:
apiVersion: enterprise.mariadb.com/v1alpha1
kind: MariaDB
metadata:
name: mariadb-repl
spec:
# [...]
replication:
enabled: true
primary:
autoSwitchoverOnGracefulShutdown: false
# [...]You can achieve this imperatively using kubectl patch:
kubectl patch mariadb mariadb-repl \
--type='merge' \
-p '{"spec":{"replication":{"primary":{"autoSwitchoverOnGracefulShutdown":false}}}}'Update the Operator: Once the CRs have been updated, you can safely upgrade the operator controller to version 26.06.
More Information
For more details, please refer to the Primary Switchover on Graceful Shutdown section in the Replication documentation.
This page is: Copyright © 2026 MariaDB. All rights reserved.
Last updated
Was this helpful?

