Skip to content

Design overview

The Percona Operator for MySQL automates and simplifies deploying and managing open source MySQL clusters on Kubernetes.

Containers deployed with the Operator include the following components:

The design of the Operator is highly bound to Percona Server for MySQL and the high availability implementation based on Orchestrator, which in its turn can be briefly described with the following diagram.

image

Being a regular MySQL Server instance, each node contains the same set of data synchronized accross nodes. The recommended configuration is to have at least 3 nodes. In a basic setup with this amount of nodes, Percona Server for MySQL provides high availability, continuing to function if you take any of the nodes down.

To provide high availability operator uses node affinity to run Percona Server for MySQL instances on separate worker nodes if possible. If some node fails, the pod in it is automatically re-created on another node.

image

To provide data storage for stateful applications, Kubernetes uses Persistent Volumes. A PersistentVolumeClaim (PVC) is used to implement the automatic storage provisioning to pods. If a failure occurs, the Container Storage Interface (CSI) should be able to re-mount storage on a different node. The PVC StorageClass must support this feature (Kubernetes and OpenShift support this in versions 1.9 and 3.9 respectively).

The Operator functionality extends the Kubernetes API with PerconaServerMySQL object, and it is implemented as a golang application. Each PerconaServerMySQL object maps to one separate MySQL setup. The Operator listens to all events on the created objects. When a new PerconaServerMySQL object is created, or an existing one undergoes some changes or deletion, the Operator automatically creates/changes/deletes all needed Kubernetes objects with the appropriate settings to provide a proper Percona Server for MySQL operation.

Get expert help

If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services. Join K8S Squad to benefit from early access to features and “ask me anything” sessions with the Experts.


Last update: 2024-03-22