This document discusses running MySQL on Kubernetes with Percona Kubernetes Operators. It provides an introduction to cloud native applications and Kubernetes. It then discusses the benefits and challenges of running MySQL on Kubernetes compared to database-as-a-service options. It introduces Percona Kubernetes Operators for MySQL, which help manage and configure MySQL deployments on Kubernetes. Finally, it discusses how to deploy MySQL with the Percona Kubernetes Operators, including prerequisites, connectivity, architecture, high availability, and monitoring.
My INSURER PTE LTD - Insurtech Innovation Award 2024
Room 2 - 6 - Đinh Tuấn Phong - Migrate opensource database to Kubernetes easier with Percona Kubernetes Operators
1. MySQL on Kubernetes with
Percona Kubernetes Operators
Dinh Tuan Phong
Support Engineer @ Percona
2. Agenda
1. Introduction
2. Cloud-native Applications and Kubernetes
3. Running MySQL on Kubernetes
4. About Percona Kubernetes Operators for MySQL
5. Deploy MySQL with Percona Kubernetes Operators
4. • We build open source database strategies and software to help Customer reduce the
complexity, costs, and effort when managing the database environments.
• Our Products and Solutions
About Percona
Distribu(on for PostgreSQL
5. • Support Engineer at Percona
• APAC Support Team
• Based in Hanoi, Vietnam
• Worked as Infra engineer and DevOps Engineer before joined Percona
About me
7. “ Cloud native is an approach to building and running applications that fully exploit the advantages of
the cloud computing model. When companies build and operate applications using a cloud native
architecture, they bring new ideas to market faster and respond sooner to customer demands”
Source: Pivotal (VmWare)
Cloud native application
8. “ Cloud native computing uses an open source software stack to be:
• Containerized: Each part (applications, processes, etc.) is packaged it its own container. This
facilitates reproducibility, transparency, and resource isolation.
• Dynamically orchestrated: Containers are actively scheduled and managed to optimize resource
utilization
• Microservices-oriented: Applications are segmented into microservices. This significantly increases
the overall agility and maintainability of applications.
Source: CNCF
Cloud native application
13. MySQL database in the cloud
Two options
DBaaS K8S with application
Cloud-vendor provided
• AWS RDS (Aurora) MySQL
• Google CloudSQL MySQL
• Azure Database for MySQL
• Oracle MySQL Database service
Need to consider the database pods
are transient, so the likelihood of
database restarts or failovers is
higher, DB tasks like backup,
replication are different due to added
abstractions from containerization
14. MySQL on Kubernetes
• One platform for everything
• No vendor lock-in, portability
• Cost-efficient
• Challenges and problems
• Complexity of Kubernetes
• Stateful set for Primary/Replicas
• DB replication
• High availabity and failover
• Storage (PVC/Hostpath)
• Services: Read/write and Read Only
• Load balancing and Proxy
• Configuration
• Monitoring agents
• Backups
• Updates
• DR
• SSL
• ….
15. Operators is the key
• Operator is a pod and customer resource
definition
• Reconcile loop checks K8S API for Customer
Resource (CR)
• K8S controller are aware of CR creation or
changes
• Opreator’s code provisions and manages
v K8S privities
v DB and componets configurations
16. MySQL on Kubernetes
• One platform for everything
• No vendor lock-in, portability
• Cost-efficient
• It is easier with the operators
17. Kubernetes operators
• MySQL Operator for Kubernetes (Oracle)
• KubeDB
• PressLabs Operator
• Percona Operator for MySQL
Operator maturity model (source Redhat)
19. Percona Kubernetes Operators
• 100% open source, compatible with various Kubernetes flavors
• Support MySQL, MongoDB and PostgreSQL
• Support, maintain and develop continuously by Percona
20. Percona Kubernetes Operators for MySQL based on PXC
• Free and Open Source with easy scaling, smart update and backups with PITR
• Why PXC
v PXC= Galera + MySQL
v Ready-to-use HA solution
v Synchronous replication equals to data consistency