<p>Imagine you have a Kubernetes deployment in a cluster with autoscaling capabilities.</p>
<p>I want to make sure that only of the pods from this deployment contains a specific annotation.</p>
<p>It could be for example the first running pod, and when it stops working this annotation would be replicated to a different pod.</p>

Rodrigo Boos
<p>If you really want to prevent downtime while some nodes are going down annotations is probably not the best way. You can use a combination of some of these.</p>
<ul>
<li><a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/" rel="nofollow noreferrer">Pod Topology Spread Constraints</a>. For example, make sure there is always a pod running in one of the availability zones. Or on a node that never goes down.</li>
<li><a href="https://kubernetes.io/docs/tasks/run-application/configure-pdb/" rel="nofollow noreferrer">Pod Disruption Budget</a> (mentioned in the comments above). For example, make sure that you always have a minimum set of unavailable pods. For example, don't allow the cluster autoscaler to drain the node unless another pod is up somewhere else.</li>
</ul>
<p>✌️</p>
