Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How pod replicas sync with each other - Kubernetes?

I have a MySQL database pod with 3 replicas.
Now I'm making some changes in one pod(pod data,not pod configuration), say I'm adding a table.
How will the change reflect on the other replicas of the pod?

I'm using kubernetes v1.13 with 3 worker nodes.

like image 716
AATHITH RAJENDRAN Avatar asked Oct 17 '22 05:10

AATHITH RAJENDRAN


1 Answers

PODs do not sync. Think of them as independend processes.

If you want a clustered MySQL installation, the Kubernetes docs describe how to do this by using a StatefulSet: https://kubernetes.io/docs/tasks/run-application/run-replicated-stateful-application/#deploy-mysql

In essence you have to configure master/slave instances of MySQL yourself.

like image 97
Markus Dresch Avatar answered Oct 19 '22 12:10

Markus Dresch