kubernetes event replay orchestration kubernetes event replay orchestration kubernetes kubernetes

kubernetes event replay orchestration


I don't know the specifics of your system, but two solutions come to my mind.

Using readinessProbe

You can define a readinessProbe for your writer service. Make it report the service is ready, when the rewrite is done. Then, the rolling updater will know when to shut down the old version of the writer and start serving traffic to the new one. The only thing you'd need to do more is notify the viewer to switch to new data source. This could be done by the writer calling some API on the viewer service.

Using separate process

You can create a special process that will execute the procedure you described using Kubernetes API. It is more work than the first solution, but gives you more control over the whole process. It would observe your repository if there are new versions of writers, if yes, it would start a new service, wait for it to be ready, kill the old writer and notify the viewer.