<p>In kubernetes there is a rolling update (automatically without downtime) but there is not a rolling restart, at least i could not find. We have to change deployment yaml. Is there a way to make rolling "restart", preferably without changing deployment yaml?</p>

muratcavus
<p>Before kubernetes 1.15 the answer is no. But there is a workaround of patching deployment spec with a dummy annotation:</p>

<pre><code>kubectl patch deployment web -p \
  "{\"spec\":{\"template\":{\"metadata\":{\"annotations\":{\"date\":\"`date +'%s'`\"}}}}}"
</code></pre>

<p>As of kubernetes 1.15 you can use:</p>

<pre><code>kubectl rollout restart deployment your_deployment_name
</code></pre>

<blockquote>
  <p><a href="https://kubernetes.io/docs/setup/release/#cli-improvements" rel="noreferrer">CLI Improvements</a></p>
  
  <ul>
  <li>Created a new <code>kubectl rollout restart</code> command that does a rolling restart of a deployment.</li>
  <li><code>kubectl rollout restart</code> now works for DaemonSets and StatefulSets</li>
  </ul>
</blockquote>
