<p>When you decrease the number of pods in a Kubernetes workload, I am assuming it is doing a soft kill. Does it start that process by stopping incoming connections? In an event-driven microservice environment, where container reads message from a queue. When I deploy, what happens to the message that are currently being processed. Does it stop taking messages from the queue?</p>

<blockquote>
<p>When you decrease the number of pods in a kubernetes workload, i am assuming it is doing a soft kill.</p>
</blockquote>
<p>Yes, it does a <em>graceful termination</em>, so your pod get a <code>SIGTERM</code> signal, but it is up to you to implement this handling in the app, before the pod is killed after the configured <em>graceful termination period</em>, by default 30 seconds but can be configured with the <code>terminationGracePeriodSeconds</code> field of the Pod.</p>
<blockquote>
<p>In an event-driven microservice environment, where container reads message from a queue. When i deploy, what happens to the message that are currently being processed. Does is stop taking messages from the queue?</p>
</blockquote>
<p>As explained above, your app needs to implement the handling of the <code>SIGTERM</code> signal and e.g. stop consuming new messages from the queue. You also need to properly configure the <code>terminationGracePeriodSeconds</code> so that messages can fully be processed before the pod is evicted.</p>
<p>A good explanation of this is <a href="https://cloud.google.com/blog/products/gcp/kubernetes-best-practices-terminating-with-grace" rel="nofollow noreferrer">Kubernetes best practices: terminating with grace</a></p>
<blockquote>
<p>Does it start that process by stopping incoming connections?</p>
</blockquote>
<p>Yes, your pod is removed from the <code>Kubernetes Endpoint</code> list, so it should work if you access your pods via Services.</p>
