<p>Say we have this in a deployment.yml</p>

<pre><code>containers:
  - name: my_container
    imagePullPolicy: Always
    image: my_image:latest
</code></pre>

<p>and so redeployment might take the form of:</p>

<pre><code>kubectl set image deployment/my-deployment my_container=my_image
</code></pre>

<p>which I stole from here:</p>

<p><a href="https://stackoverflow.com/a/40368520/1223975">https://stackoverflow.com/a/40368520/1223975</a></p>

<p>my question is - is this the right way to do a rolling-update? Will the above always work to make sure the deployment gets the new image?  My deployment.yml might never change - it might just be <code>my_image:latest</code> forever, so how to do rolling updates?</p>

<p>I don't expect this to be an accepted answer. But I wanted to make it for the future as there <em>is</em> a command to do this in Kubernetes 1.15.</p>

<p>PR <a href="https://github.com/kubernetes/kubernetes/pull/76062" rel="noreferrer">https://github.com/kubernetes/kubernetes/pull/76062</a> added a command called <code>kubectl rollout restart</code>. It is part of Kubernetes 1.15. In the future you will be able to do:</p>

<pre><code>kubectl rollout restart deployment/my-deployment
</code></pre>
