<p>After some intense google and SO search i couldn't find any document that mentions both rolling update and set image, and can stress the difference between the two.</p>

<p>Can anyone shed light? When would I rather use either of those?</p>

<p>EDIT: It's worth mentioning that i'm already working with deployments (rather than replication controller directly) and that I'm using yaml configuration files. It would also be nice to know if there's a way to perform any of those using configuration files rather than direct commands.</p>

<p>In older k8s versions the <code>ReplicationController</code> was the only resource to manage a group of replicated pods. To update the pods of a <code>ReplicationController</code> you use <code>kubectl rolling-update</code>. </p>

<p>Later, k8s introduced the <code>Deployment</code> which manages <code>ReplicaSet</code> resources. The <code>Deployment</code> could be updated via <code>kubectl set image</code>. </p>

<p>Working with <code>Deployment</code> resources (as you already do) is the preferred way. I guess the <code>ReplicationController</code> and its <code>rolling-update</code> command are mainly still there for backward compatibility.</p>

<hr>

<p><strong>UPDATE:</strong> As mentioned in the comments:</p>

<p>To update a <code>Deployment</code> I used <code>kubectl patch</code> as it could also change things like adding new env vars whereas <code>kubectl set image</code> is rather limited and can only change the image version. Also note, that <code>patch</code> can be applied to all k8s resources and is not restricted to be used with a <code>Deployment</code>.</p>

<p>Later, I shifted my deployment processes to use <a href="https://helm.sh/" rel="nofollow noreferrer">helm</a> - a really neat and k8s native package management tool. Can highly recommend to have a look at it.</p>
