<p>I have a set of Pods running commands that can take up to a couple seconds.  There is a process that keeps track of open request &amp; which Pod the request is running on.  I'd like the use that information when scaling down pods - either by specifying which pods to try to leave up, or specifying which pods to shut down.  Is it possible to specify this type of information when changing the # of replicas, e.g. I want X replicas, try not to kill my long running tasks on pods A, B, C?</p>

<p>You can annotation  specific pod with <code>controller.kubernetes.io/pod-deletion-cost: -999</code> and enable <code>PodDeletionCost</code> featuregate. This feature is implement alpha in 1.21 and beta in 1.22.</p>
<blockquote>
<p><code>controller.kubernetes.io/pod-deletion-cost</code> annotation can be set to offer a hint on the cost of deleting a pod compared to other pods belonging to the same ReplicaSet. Pods with lower deletion cost are deleted first.</p>
</blockquote>
<p><a href="https://github.com/kubernetes/kubernetes/pull/99163" rel="noreferrer">https://github.com/kubernetes/kubernetes/pull/99163</a>
<a href="https://github.com/kubernetes/kubernetes/pull/101080" rel="noreferrer">https://github.com/kubernetes/kubernetes/pull/101080</a></p>
