This document summarizes a talk about the MySQL Operator for InnoDB Cluster on Kubernetes. It discusses the trend of running databases on Kubernetes using operators, the need for operators to handle stateful applications like databases, and an overview of the Oracle MySQL Operator including its architecture, features, maturity level, and a demonstration of setting it up.
1. MySQL Operator For InnoDB Cluster
July 30th, 2022
Mydbops Database Meetup -12
Kabilesh PR
Co-Founder, Mydbops
2. Interested in Open Source technologies
MySQL Certified Professional
Tech Speaker/Blogger
AWS certified Database speciality
AWS community builder / SME
Co-Founder, Mydbops IT Solutions
Kabilesh PR
About Me
5. Trend Shift
Kubernetes:
The most popular open source project for container orchestration
Cloud native and K8S service available in AWS, Azure and GCP
Offer rapidly scalable approach on containers
Infrastructure as a code, Now being pushed to database systems as well (stateful)
6. Need Of Kubernetes Operator
Native K8S functions are more sophisticated for to run the stateless system
To run complex stateful system like database requires, Product knowledge
Making database containers on production requires a lot of design decisions
Auto Node Provisioning
Fault Tolerance / High Availability
Backups and Monitoring
Up Scaling, Down Scaling / Appropriate Traffic Distribution
7. Feature to support DB
Persistent Volume support
Initialization - Init
Healthcheck - Probes (readiness, Liveness)
Configmap - Custom configuration
8. Need Of Kubernetes Operator
Operator:
Extension of Kubernetes Controller API (Which Just Checks Service States)
Operator can be referenced as Application specific Controller
Operator can be programmed to include application-specific knowledge to
automate the entire life cycle of the software it manages
9. Choose Your Operator Wisely
Operator Scope / Maturity Model
Reference: O'Reilly Kubernetes Operator Book
10. Oracle MySQL Operator
Services (LB)
Stateful Sets
Operator Maturity
Apache-2.0 License
Operator maturity level, Stage 3
Based On GR / Innodb Cluster
Kubernetes version > 1.8
GA Release : May 2022
Last Commit: 18 days ago
12. Oracle InnoDB Cluster Operator
Better documentation support (https://dev.mysql.com/doc/mysql-operator/en/)
Very few changes required to migrate
Provides auto node provision and node recovery through Clone
GR, Provides Synchronous replication and Fault tolerance
MySQL Router takes care of load distribution and routing to live nodes
Backups are taken via mysqldump, possible to use clone plugin
8.0 Support Available
13. Production Readiness
Operational Expertise
Dev + Ops + DBE skills requried
Most common corner cases where Operator cannot self heal are
All DB nodes going on a crashed
Fixing of node in crash loop
Requests and Resources adjustments and Configuration changes
14. Production Readiness
Bugs in Operators can be deadly
Develop ability to customise and add features to exiting Operators
Clear benchmarks required, Performance drop is expected, Scale horizontally
Performance on BM > VM > Containers