I need to implement a mock server whose instance needs to be deployed on non-production environments. I am using docker image mockserver/mockserver
To Clarify I'll explain the scenario here: Our app will be using a 3rd part API which is not available in sandbox environment and for that we need to mock the apis for staging. This mocked server's instance wil only run for staging and development environment.
I need to deploy this using kubernetes only for staging
and development
environment and not for the production
one.
There are couple of solutions in my mind but not sure which is better.
- Deploy a
separate instance
of this mock-server(aside from main app container) only for non-production environments. - Or deploy this mock-server as as
sidecar
next to main container. (But not sure how this sidecar can be deployed only for staging and development only)
Please suggest which approach is better and why and is there any other way to achieve this?