ConfigMap allow you to decouple configuration artifacts and secrets from image content to keep containerized applications portable. Using ConfigMap, you can independently control MySQL configuration.
We will create a new
mysql that will host all the components.
kubectl create namespace mysql
Run the following commands to download the
cd ~/environment/templates wget https://eksworkshop.com/beginner/170_statefulset/configmap.files/mysql-configmap.yml
Check the configuration of mysql-configmap.yml file.
ConfigMap stores master.cnf, slave.cnf and passes them when initializing leader and follower pods defined in StatefulSet:
kubectl create -f ~/environment/templates/mysql-configmap.yml