I have a Flask application deployed on GKE, duplicated in several pods. For performance issues, I want this app to read local files from the app repository. I need to update these files frequently with another Python script.
I could implement an endpoint to fetch the refreshed files from a server but if I ping this endpoint only one pod will update the local files, and I need all app instances to read from latest data files.
Do you have an idea on how to solve this issue?