MySQL Operator for Kubernetes
Johannes Schlüter - MySQL Container Experience and Orchestration Manager
Kenny Gryp - MySQL Product Manager
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for information purpose only, and may not be incorporated into any
contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied up in making purchasing decisions. The
development, release and timing of any features or functionality described for Oracle's product remains at the sole discretion of Oracle.
2 / 16
Components:
MySQL Server
MySQL Group Replication
MySQL Shell
MySQL Router
MySQL InnoDB Cluster
"A single product — MySQL — with high availability and scaling features baked in;
providing an integrated end-to-end solution that is easy to use."
3 / 16
High Available Distributed MySQL DB
Fault tolerance
Automatic failover
Active/Active update anywhere (limits apply)
Automatic membership management
Adding/removing members
Network partitions, failures
Con ict detection and resolution
Prevents data loss
MySQL Group Replication
4 / 16
Transparent Access to Database Arch.
"provide transparent routing between your application and back-end
MySQL Servers"
Transparent client connection routing
Load balancing
Application connection failover
Li le to no con guration needed
Stateless design o ers easy HA client routing
Router as part of the application stack
Integration into InnoDB Cluster & InnoDB ReplicaSet
2 TCP Ports: PRIMARY and NON-PRIMARY tra c
MySQL Router
5 / 16
Database Administration Interface
"MySQL Shell provides the developer and DBA with a single intuitive,
exible, and powerful interface for all MySQL related tasks!"
Multi-Language: JavaScript, Python, and SQL
Naturally scriptable
Supports Document and Relational models
Exposes full Development and Admin API
Classic MySQL protocol and X protocol
MySQL Shell
6 / 16
A portable, extensible, open-source platform for managing
containerized workloads and services, that facilitates both declarative
con guration and automation.
Kubernetes
7 / 16
A portable, extensible, open-source platform for managing
containerized workloads and services, that facilitates both declarative
con guration and automation.
Kubernetes Operator
Method of automatically deploying and managing a service.
Goals of an operator:
Deployment
Con guration
Self-healing
Backup & Restore
Observability
Using Kubernetes custom resources
Kubernetes
7 / 16
A portable, extensible, open-source platform for managing
containerized workloads and services, that facilitates both declarative
con guration and automation.
Kubernetes Operator
Method of automatically deploying and managing a service.
Goals of an operator:
Deployment
Con guration
Self-healing
Backup & Restore
Observability
Using Kubernetes custom resources
Both Kubernetes Operator
& MySQL InnoDB Cluster
share a common goal to make it easier to
deploy, automate and manage a service.
Kubernetes
7 / 16
MySQL Operator for Kubernetes
New MySQL Operator for Kubernetes
Developed by MySQL team @ Oracle
same team that develops MySQL InnoDB Cluster
Integrated with MySQL InnoDB Cluster
Coordinated development between both projects
MySQL Operator for Kubernetes
K8s Operator leverages MySQL InnoDB Cluster to deploy the declared architecture
Keeps cluster healthy
Replaces instances when another fails
Recovers complete cluster goes o ine
Can recover in certain quorum majority loss situations
Backup & Recovery
9 / 16
Consistency: No Data Loss (RPO=0)
in event of failure of (primary) member
Split brain prevention (Quorum)
MySQL Group Replication - Use Cases
10 / 16
Consistency: No Data Loss (RPO=0)
in event of failure of (primary) member
Split brain prevention (Quorum)
Highly Available: Automatic Failover
Primary members are automatically elected
Automatic Network Partition handling
MySQL Group Replication - Use Cases
10 / 16
Consistency: No Data Loss (RPO=0)
in event of failure of (primary) member
Split brain prevention (Quorum)
Highly Available: Automatic Failover
Primary members are automatically elected
Automatic Network Partition handling
Read Scaleout
Add/Remove members as needed
Replication Lag handling with Flow Control
Con gurable Consistency Levels
Eventual
Full Consistency -- no stale reads
MySQL Group Replication - Use Cases
10 / 16
Simplifying automation and container deployment
MySQL InnoDB Cluster
MySQL Shell dump/load
CLONE plugin
SET PERSIST
RESTART
performance_schema.error_log
...
Connectors supporting DNS-SRV
8.0.19
DNS Service record - RFC 2782
"de ning the location, i.e., the hostname and port number, of
servers for speci ed services"
Available in:
Connector/NET
Connector/ODBC
Connector/J
Connector/Node.js
Connector/Python
Connector/C++
MySQL 8.0
11 / 16
MySQL 8.0 Container Images
Improvements in 8.0.24 (Released April 2021), aimed to be er work in kubernetes environments:
Refactoring of to be er support various avors of Kubernetes
e.g: Supporting random user ID
RESTART capability
CLONE support
MySQL Router Container GA
Community version available on h ps://hub.docker.com/u/mysql
Commercial versions are available on h ps://container-registry.oracle.com
12 / 16
MySQL Operator for Kubernetes
13 / 16
Automated deployment and management of
MySQL Server
MySQL Router
Self-healing
Backup & Restore
Scaleup/Scaledown of Router & Server
Rolling upgrades with minimal downtime
Con guration Management
Deploy from InnoDB CLONE
Private container registries
MySQL Operator for Kubernetes - Features
Level III Maturity Operator
14 / 16
Automated deployment and management of
MySQL Server
MySQL Router
Self-healing
Backup & Restore
Scaleup/Scaledown of Router & Server
Rolling upgrades with minimal downtime
Con guration Management
Deploy from InnoDB CLONE
Private container registries
MySQL Operator for Kubernetes - Features
Level III Maturity Operator
Community Edition, Open Source License (UPL)
Enterprise Edition
Fully supported by Oracle
14 / 16
Automated deployment and management of
MySQL Server
MySQL Router
Self-healing
Backup & Restore
Scaleup/Scaledown of Router & Server
Rolling upgrades with minimal downtime
Con guration Management
Deploy from InnoDB CLONE
Private container registries
MySQL Operator for Kubernetes - Features
Level III Maturity Operator
Community Edition, Open Source License (UPL)
Enterprise Edition
Fully supported by Oracle
Public beta will be released in a few weeks
14 / 16
Demo
15 / 16
Q&A

MySQL Operator for Kubernetes

  • 1.
    MySQL Operator forKubernetes Johannes Schlüter - MySQL Container Experience and Orchestration Manager Kenny Gryp - MySQL Product Manager
  • 2.
    Safe Harbor Statement Thefollowing is intended to outline our general product direction. It is intended for information purpose only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied up in making purchasing decisions. The development, release and timing of any features or functionality described for Oracle's product remains at the sole discretion of Oracle. 2 / 16
  • 3.
    Components: MySQL Server MySQL GroupReplication MySQL Shell MySQL Router MySQL InnoDB Cluster "A single product — MySQL — with high availability and scaling features baked in; providing an integrated end-to-end solution that is easy to use." 3 / 16
  • 4.
    High Available DistributedMySQL DB Fault tolerance Automatic failover Active/Active update anywhere (limits apply) Automatic membership management Adding/removing members Network partitions, failures Con ict detection and resolution Prevents data loss MySQL Group Replication 4 / 16
  • 5.
    Transparent Access toDatabase Arch. "provide transparent routing between your application and back-end MySQL Servers" Transparent client connection routing Load balancing Application connection failover Li le to no con guration needed Stateless design o ers easy HA client routing Router as part of the application stack Integration into InnoDB Cluster & InnoDB ReplicaSet 2 TCP Ports: PRIMARY and NON-PRIMARY tra c MySQL Router 5 / 16
  • 6.
    Database Administration Interface "MySQLShell provides the developer and DBA with a single intuitive, exible, and powerful interface for all MySQL related tasks!" Multi-Language: JavaScript, Python, and SQL Naturally scriptable Supports Document and Relational models Exposes full Development and Admin API Classic MySQL protocol and X protocol MySQL Shell 6 / 16
  • 7.
    A portable, extensible,open-source platform for managing containerized workloads and services, that facilitates both declarative con guration and automation. Kubernetes 7 / 16
  • 8.
    A portable, extensible,open-source platform for managing containerized workloads and services, that facilitates both declarative con guration and automation. Kubernetes Operator Method of automatically deploying and managing a service. Goals of an operator: Deployment Con guration Self-healing Backup & Restore Observability Using Kubernetes custom resources Kubernetes 7 / 16
  • 9.
    A portable, extensible,open-source platform for managing containerized workloads and services, that facilitates both declarative con guration and automation. Kubernetes Operator Method of automatically deploying and managing a service. Goals of an operator: Deployment Con guration Self-healing Backup & Restore Observability Using Kubernetes custom resources Both Kubernetes Operator & MySQL InnoDB Cluster share a common goal to make it easier to deploy, automate and manage a service. Kubernetes 7 / 16
  • 10.
  • 11.
    New MySQL Operatorfor Kubernetes Developed by MySQL team @ Oracle same team that develops MySQL InnoDB Cluster Integrated with MySQL InnoDB Cluster Coordinated development between both projects MySQL Operator for Kubernetes K8s Operator leverages MySQL InnoDB Cluster to deploy the declared architecture Keeps cluster healthy Replaces instances when another fails Recovers complete cluster goes o ine Can recover in certain quorum majority loss situations Backup & Recovery 9 / 16
  • 12.
    Consistency: No DataLoss (RPO=0) in event of failure of (primary) member Split brain prevention (Quorum) MySQL Group Replication - Use Cases 10 / 16
  • 13.
    Consistency: No DataLoss (RPO=0) in event of failure of (primary) member Split brain prevention (Quorum) Highly Available: Automatic Failover Primary members are automatically elected Automatic Network Partition handling MySQL Group Replication - Use Cases 10 / 16
  • 14.
    Consistency: No DataLoss (RPO=0) in event of failure of (primary) member Split brain prevention (Quorum) Highly Available: Automatic Failover Primary members are automatically elected Automatic Network Partition handling Read Scaleout Add/Remove members as needed Replication Lag handling with Flow Control Con gurable Consistency Levels Eventual Full Consistency -- no stale reads MySQL Group Replication - Use Cases 10 / 16
  • 15.
    Simplifying automation andcontainer deployment MySQL InnoDB Cluster MySQL Shell dump/load CLONE plugin SET PERSIST RESTART performance_schema.error_log ... Connectors supporting DNS-SRV 8.0.19 DNS Service record - RFC 2782 "de ning the location, i.e., the hostname and port number, of servers for speci ed services" Available in: Connector/NET Connector/ODBC Connector/J Connector/Node.js Connector/Python Connector/C++ MySQL 8.0 11 / 16
  • 16.
    MySQL 8.0 ContainerImages Improvements in 8.0.24 (Released April 2021), aimed to be er work in kubernetes environments: Refactoring of to be er support various avors of Kubernetes e.g: Supporting random user ID RESTART capability CLONE support MySQL Router Container GA Community version available on h ps://hub.docker.com/u/mysql Commercial versions are available on h ps://container-registry.oracle.com 12 / 16
  • 17.
    MySQL Operator forKubernetes 13 / 16
  • 18.
    Automated deployment andmanagement of MySQL Server MySQL Router Self-healing Backup & Restore Scaleup/Scaledown of Router & Server Rolling upgrades with minimal downtime Con guration Management Deploy from InnoDB CLONE Private container registries MySQL Operator for Kubernetes - Features Level III Maturity Operator 14 / 16
  • 19.
    Automated deployment andmanagement of MySQL Server MySQL Router Self-healing Backup & Restore Scaleup/Scaledown of Router & Server Rolling upgrades with minimal downtime Con guration Management Deploy from InnoDB CLONE Private container registries MySQL Operator for Kubernetes - Features Level III Maturity Operator Community Edition, Open Source License (UPL) Enterprise Edition Fully supported by Oracle 14 / 16
  • 20.
    Automated deployment andmanagement of MySQL Server MySQL Router Self-healing Backup & Restore Scaleup/Scaledown of Router & Server Rolling upgrades with minimal downtime Con guration Management Deploy from InnoDB CLONE Private container registries MySQL Operator for Kubernetes - Features Level III Maturity Operator Community Edition, Open Source License (UPL) Enterprise Edition Fully supported by Oracle Public beta will be released in a few weeks 14 / 16
  • 21.
  • 22.