I want to execute a script (which is present inside the container) whenever a container replica has been scaled up.
For initial deployment, we can use az container exec to execute the shell script. How to handle this?
Note: I don't want to use this as a entry point of my container.
I'm having naive thought process of relying on some trigger with Azure functions or logic apps. Is there any better solution?
You can use init containers. Those will run before your main container.