<p>I have a microservice running in kubernetes with deployment. It is serving a Node JS application with PM2.
I recently found whenever I deploy a new version of application with helm, i can see PM2 is being exited with code [0]</p>
<pre><code>PM2 log: App [api.bundle:0] exited with code [0] via signal [SIGINT]
</code></pre>
<p>I tried to investigate if there is an exception in application. Could not found any error prior deployment. That leads me to ask if how pm2 is getting restarted? Does kubernetes sends kill signal to pm2 if an new deployment comes in?</p>

<p><code>...whenever I deploy a new version of application with helm, i can see PM2 is being exited with code [0]</code></p>
<p>When you do <code>helm upgrade</code> the command triggers rolling update to the deployment which replace existing pod(s) with new pod. During this process, <code>signal [SIGINT]</code> was sent to inform your PM2 container it's time to exit.</p>
<p><code>...if how pm2 is getting restarted? Does kubernetes sends kill signal to pm2 if an new deployment comes in?</code></p>
<p>Correct.</p>
