<p>I'm trying to get all the deployments of a namespace to be restarted for implementation reasons.</p>
<p>I'm using &quot;kubectl rollout -n  restart deploy&quot; and it works perfectly, but I'm not sure it that command causes downtime or if it works as the &quot;rollout update&quot;, applying the restart one by one, keeping my services up.</p>
<p>Does anyone know?</p>
<p>In the documentation I can only find this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Operation</th>
<th>Syntax</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>rollout</td>
<td>kubectl rollout SUBCOMMAND [options]</td>
<td>Manage the rollout of a resource. Valid resource types include: deployments, daemonsets and statefulsets.</td>
</tr>
</tbody>
</table>
</div>
<p>But I can't find details about the specific &quot;rollout restart deploy&quot;.</p>
<p>I need to make sure it doesn't cause downtime. Right now is very hard to tell, because the restart process is very quick.</p>
<p>Update: I know that for one specific deployment (<strong>kubectl rollout restart deployment/name</strong>), it works as expected and doesn't cause downtime, but I need to apply it to all the namespace (without specifying the deployment) and that's the case I'm not sure about.</p>

Diego Arias
<p>@pcsutar 's answer is almost correct. <code>kubectl rollout restart $resourcetype $resourcename</code> restarts your deployment, daemonset or stateful set according to the its update strategy. so if it is set to <code>rollingUpdate</code> it will behave exactly as the above answer:</p>
<blockquote>
<ol>
<li>After restart it will create new pods for a each deployments</li>
<li>Once new pods are up (running and ready) it will terminate old pods</li>
</ol>
<p>Add readiness probes to your deployments to configure initial delays.</p>
</blockquote>
<p>However, if the strategy for example is <code>type: recreate</code> all the currently running pods belonging to the deployment will be terminated before new pods will be spun up!</p>
