rancher挂载mysql配置

  1. 资源->配置映射->添加配置映射
my.cnf [mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
innodb_buffer_pool_size = 8G
symbolic-links=0
server-id = 1
log_bin = /var/lib/mysql/mysql_bin
binlog-ignore-db = mysql
binlog-ignore-db = test
binlog-ignore-db = information_schema
skip-host-cache
skip-name-resolve

键:就是文件名
值:就是文件内容

  1. 修改服务

添加卷类型为配置映射卷,默认模式改成444只读

rancher挂载mysql配置_第1张图片
3.删掉原来的pod,重启一个pod就可以了

你可能感兴趣的:(容器)