I'm wondering what will happen when you have multiple instances (pods) of one database running. I don't have a test-environment at the moment so that's the reason I have to ask this.
So for example:
- In the beginning you have one MySQL service with one RC and one pod which contains one running container of mysql. It will use persistent storage.
- I will do some configuration on the DB and add some data. After it, I will scale the existing pod with the help of my RC. Until I have 5 instances running of my database. They are all the same.
--> Q1: Will they contain the same data after the scaling? I would think so.
When I'm connecting the DB to an existing application, I assume that all the instances will contain the same data when I add some data via the application. A broken pod will be rebuild and contain the same data thanks to persistent storage.
--> Q2: What will happen when I access one of the running db-containers and I change some column or add some table?
(I'm afraid the change will only be effective on the datbase I accessed)
--> Q3: What will happen when I access one of the running db-containers and I add some data?
(To me it looks pretty the same as Q1 so I think the data will be in every container after that, thanks to persistent storage).