<p>If I have a deployment with only a single replica defined, can I ensure that only ever one pod is running?</p>
<p>I noticed that when I do something like <code>kubectl rollout</code> for a very short amount of time I will see two pods in my logs.</p>

<blockquote>
<p>If I have a deployment with only a single replica defined, can I ensure that only ever one pod is running?</p>
</blockquote>
<p>It sounds like you are asking for &quot;at most one Pod&quot; semantics. Also consider what happens when a Node becomes <em>unresponsive</em>.</p>
<p>This is point where <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/" rel="noreferrer">Deployment</a> and <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/" rel="noreferrer">StatefulSet</a> has different behavior.</p>
<h4>Deployment</h4>
<p>Has <strong>at least one</strong> Pod behavior, and may scale up new pods if it is unclear it at least one is running.</p>
<h4>StatefulSet</h4>
<p>Has <a href="https://kubernetes.io/docs/tasks/run-application/force-delete-stateful-set-pod/#statefulset-considerations" rel="noreferrer"><strong>at most one</strong></a> Pod behavior, and make sure to not scale up more pods if it is unclear if at most one is running.</p>
