未加星标

Deploying MySQL on Kubernetes with a Percona-based Operator

字体大小 | |
[数据库(mysql) 所属分类 数据库(mysql) | 发布者 店小二04 | 时间 2018 | 作者 红领巾 ] 0人收藏点击收藏

Deploying MySQL on Kubernetes with a Percona-based Operator
In the context of providing managed WordPress hosting services, at Presslabs we operate with lots of small to medium-sized databases, in a DB-per-service model, as we call it. The workloads are mostly reads, so we need to efficiently scale that. The mysql asynchronous replication model fits the bill very well, allowing us to scale horizontally from one server―with the obvious availability pitfalls―to tens of nodes. The next release of the stack is going to be open-sourced.

As we were already using Kubernetes , we were looking for an operator that could automate our DB deployments and auto-scaling. Those available were doing synchronous replication using MySQL group replication or Galera-based replication. Therefore, we decided to write our own operator.

Solution architecture

The MySQL operator , released under Apache 2.0 license, is based on Percona Server for MySQL for its operational improvements ―like utility user and backup locks―and relies on the tried and tested Orchestrator to do the automatic failovers. We’ve been usingPercona Server in production for about four years, with very good results, thus encouraging us to continue implementing it in the operator as well.

The MySQL Operator-Orchestrator integration is highly important for topology, as well as for cluster healing and system failover. Orchestrator is a MySQL high availability and replication management tool that was coded and opened by GitHub .

As we’re writing this, the operator is undergoing a full rewrite to implement the operator using the Kubebuilder framework, which is a pretty logical step to simplify and standardize the operator to make it more readable to contributors and users.

Aims for the project

We’ve built the MySQL operator with several considerations in mind, generated by the needs that no other operator could satisfy at the time we started working on it, last year.

Here are some of them:

Easily deployable MySQL clusters in Kubernetes, following the cluster-per-service model DevOps-friendly, critical to basic operations such as monitoring, availability, scalability, and backup stories Out-of-the-box backups, scheduled or on-demand, and point-in-time recovery Support for cloning, both inside a cluster and across clusters

It’s good to know that the MySQL operator is now in beta version, and can be tested in production workloads. However, you can take a spin and decide for yourself―we’re already successfully using it for a part of our production workloads at Presslabs , for our customer dashboard services.

Going further to some more practical info, we’ve successfully installed and tested the operator on AWS, Google Cloud Platform, and Microsoft Azure and covered the step by step process in three tutorials here.

Set up and configuration

It’s fairly simple to use the operator. Prerequisites would be the ubiquitous Helm and Kubectl .

The first step is to install the controller. Two commands should be run, to make use of the Helm chart bundled in the operator:

$ helm repo add presslabs https://presslabs.github.io/charts $ helm install presslabs/mysql-operator --name mysql-operator

These commands will deploy the controller together with an Orchestrator cluster.

The configuration parameters of the Helm chart for the operator and its default values are as follows:

Parameter Description Default value replicaCount replicas for controller 1 image controller container image quay .io / presslabs / mysql - operator : v0 . 1.5 imagePullPolicy controller image pull policy IfNotPresent helperImage mysql helper image quay .io / presslabs / mysql - helper : v0 . 1.5 installCRDs whether or not to install CRDS true resources controller pod resources {} nodeSelector controller pod nodeSelector {} tolerations controller pod tolerations {} affinity controller pod affinity {} extraArgs args that are passed to controller [] rbac .create whether or not to create rbac service account, role and roleBinding true rbac .serviceAccountName If rbac.create is false then this service account is used default orchestrator .replicas Control Orchestrator replicas 3 orchestrator .image Orchestrator container image quay .io / presslabs / orchestrator : latest

本文数据库(mysql)相关术语:navicat for mysql mysql workbench mysql数据库 mysql 存储过程 mysql安装图解 mysql教程 mysql 管理工具

tags: MySQL,controller,The,image
分页:12
转载请注明
本文标题:Deploying MySQL on Kubernetes with a Percona-based Operator
本站链接:https://www.codesec.net/view/604890.html


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 数据库(mysql) | 评论(0) | 阅读(31)