<p>I was doing a practice exam on the website killer.sh , and ran into a question I feel I did a hacky solution to. Given a deployment that has had a bad rollout, revert to the <em><strong>last</strong></em> revision that didn't have any issues. If I check a deployment's rollout history, for example with the command:</p>
<pre><code>kubectl rollout history deployment mydep
</code></pre>
<p>I get a small table with version numbers, and &quot;change-cause&quot; commands. Is there any way to check the changes made to the deployment's yaml file for a specific revision? Because I was stumped in figuring out which specific revision didn't have the error inside of it.</p>

yesman
<p>Behind the scenes a <code>Deployment</code> creates a <code>ReplicaSet</code> that has its <code>metadata.generation</code> set to the <code>REVISION</code> you see in <code>kubectl rollout history deployment mydep</code>, so you can look at and diff old <code>ReplicaSet</code>s associated with the <code>Deployment</code>.</p>
<p>On the other hand, being an eventually-consistent system, kubernetes has no notion of &quot;good&quot; or &quot;bad&quot; state, so it can't know what was the last successful deployment, for example; that's why deployment tools like <code>helm</code>, <code>kapp</code> etc. exist.</p>
