<p>I have three demonset pods which contain a container of hadoop resource manager in each pod. One of three is active node. And the other two are standby nodes. 
So there is two quesion: </p>

<ol>
<li>Is there a way to let kubernetes know the hadoop resource manager
inside the pod is a active node or standby node? </li>
<li>I want to control the rolling update way to update the standby node at first and update the active node in last for decrease the times
changing active node which may cause risk.</li>
</ol>

shicheng
<p>Consider the following: <code>Deployments</code>, <code>DaemonSets</code> and <code>ReplicaSets</code> are abstractions meant to manage a uniform group of objects.</p>

<p>In your specific case, although you're running the same application, you can't say it's a uniform group of object as you have two types: <em>active</em> and <em>standby</em> objects.</p>

<p>There is no way for telling Kubernetes which is which if they're grouped in what is supposed to be an uniform set of objects.</p>

<p>As <a href="https://stackoverflow.com/a/57039435/10892354">suggested by @wolmi</a>, having them in a <code>Deployment</code> instead of DaemonSet still leaves you with the issue that <a href="https://www.weave.works/blog/kubernetes-deployment-strategies" rel="nofollow noreferrer">deployment strategies can't individually identify objects</a> to control when they're updated because of the aforementioned logic.</p>

<p>My suggestion would be that, additional to using a <code>Deployment</code> with <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/" rel="nofollow noreferrer"><code>node affinity</code></a> to ensure a highly available environment, you separate <em>active</em> and <em>standby</em> objects in different <code>Deployments/Services</code> and base your rolling update strategy on that scenario.</p>

<p>This will ensure that you're updating the <em>standby</em> nodes first, removing the risk of updating the <em>active</em> nodes before the other.</p>
