2023-06-01 21:35:50 +08:00
|
|
|
# https://kubernetes.io/docs/tasks/run-application/run-replicated-stateful-application/
|
2019-01-30 21:28:37 +08:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: mysql
|
|
|
|
labels:
|
|
|
|
app: mysql
|
2023-06-01 21:35:50 +08:00
|
|
|
app.kubernetes.io/name: mysql
|
2019-01-30 21:28:37 +08:00
|
|
|
data:
|
2023-06-01 21:35:50 +08:00
|
|
|
primary.cnf: |
|
|
|
|
# Apply this config only on the primary.
|
2019-01-30 21:28:37 +08:00
|
|
|
[mysqld]
|
|
|
|
log-bin
|
2023-06-01 21:35:50 +08:00
|
|
|
replica.cnf: |
|
|
|
|
# Apply this config only on replicas.
|
2019-01-30 21:28:37 +08:00
|
|
|
[mysqld]
|
|
|
|
super-read-only
|