How to redirect the request to a different node when there is an unexpected exception and one of the pods gets restarted
You should configure a Readiness Probe in the Deployment for your app. When using a Readiness Probe, no traffic will be sent to instances that are not prepared to receive traffic.