Scenario
When it comes to innovation in terms of application development and deployment methods, the microservices approach has gained significant popularity in recent years. This approach differs from the traditional monolithic one.
The monolithic approach involves compiling all the libraries and various components of an application into a single executable, which is then distributed on usually physical machines.
The microservices approach, on the other hand, requires that the various parts that make up an application are separated and then interconnected to ensure flexibility, lightweight executables, and resilience. In this case, the various microservices are distributed on virtual machines or Docker containers.
Each microservice has its own life and is developed to interact with others to enable the overall functioning of the application. In the event that a microservice running on virtual machines or Containers encounters errors or interrupts its execution, manual intervention is required. Kubernetes is a service that automates and simplifies the lifecycle management of microservices.
In Kubernetes, each microservice is typically represented by a Pod that runs one or more Docker Containers. Kubernetes' strategy is to restart Pods if their execution is interrupted, so these should be thought of as stateless services. Even the database component (whether MySQL, Postgres, etc.) is governed through a microservice and therefore a Pod, but a database is by definition a stateful process. Therefore, in the event of a Pod restart, all the data it possessed would be lost, unless backup and restore policies that may not meet the application's requirements are in place.
In the case of a MySQL InnoDB architecture, there would be various complexities introduced by maintenance, updates, and application administration. One example is the need to control the activation and shutdown sequence of nodes. It can be concluded that managing such activities through the Kubernetes paradigm alone becomes too complex to sustain.