apiVersion: v1
kind: ConfigMap
metadata:
  name: mysql-config
data:
  master.cnf: |                     # 配置文件自行编写，这里我用于测试只写了最简单的
    [mysqld]
    server_id=100
    binlog-ignore-db=mysql,wordpress
    log-bin=replicas-mysql-bin
    binlog_cache_size=1M
    binlog_format=mixed
    slave_skip_errors=1062
  slave.cnf: |
    [mysqld]
    server_id=102
    binlog-ignore-db=mysql,wordpress
    log-bin=replicas-mysql-slave-bin
    binlog_cache_size=1M
    binlog_format=mixed
    slave_skip_errors=1062
    relay_log=replicas-mysql-relay-bin
    log_slave_updates=1
    read_only=1
  slave2.cnf: |
    [mysqld]
    server_id=104
    binlog-ignore-db=mysql,wordpress
    log-bin=replicas-mysql-slave-bin
    binlog_cache_size=1M
    binlog_format=mixed
    slave_skip_errors=1062
    relay_log=replicas-mysql-relay-bin
    log_slave_updates=1
    read_only=1
