I have a frontend application that works perfectly fine when I have just one instance of the application running in a kubernetes cluster. But when I scale up the deployment to have 3 replicas it shows a blank page on the first load and then after the refresh, it loads the page. As soon as I scale down the app to 1, it starts loading fine again. Here is the what the console prints in the browser.
hub.xxxxx.me/:1 Refused to execute script from 'https://hub.xxxxxx.me/static/js/main.5a4e61df.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Adding the screenshot as well. Any ideas what might be the case. I know it is an infrastructure issue since it happens only when I scale the application.
One thing I noticed is that 2 pods have a different js file that the other pod.
2 pods have this file - build/static/js/main.b6aff941.js
The other pod has this file - build/static/js/main.5a4e61df.js
I think the mismatch is causing the problem. Any Idea how to fix this mismatch issue so that the pods always have the same build?