<p>I have a distributed scheduler. Now I have to pick the record and process them.
In my case, I will create a transaction and process the record.</p>
<p>Now suppose during the processing itself the Kubernetes container goes down. IN that case, what will happen does it release the lock and rollback the transaction</p>

Bharat Wadhwa
<p>When a pod should be terminated:</p>
<p>A SIGTERM signal is sent to the main process (PID 1) in each container, and a “grace period” countdown starts (defaults to 30 seconds - see below to change it).</p>
<p>Upon the receival of the SIGTERM, each container should start a graceful shutdown of the running application and exit.</p>
<p>If a container doesn’t terminate within the grace period, a SIGKILL signal will be sent and the container violently terminated.</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
    name: test
spec:
    replicas: 1
    template:
        spec:
            containers:
              - name: test
                image: ...
            terminationGracePeriodSeconds: 60
</code></pre>
<p>So in your spring boot app you need to handle the SIGTERM signal and rollback any transaction or persistent it outside for retrying it later.</p>
