<p>Now I'm testing deployments controller on kubernetes.<br>
With rollout, I set <code>spec.revisionHistoryLimit : 5</code> but the history comes out only 2 results.  </p>

<p>How can I see 5 results?  </p>

<p>yaml code :   </p>

<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 3
  revisionHistoryLimit: 5
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx
        ports:
        - containerPort: 80
</code></pre>

<p>steps:  </p>

<pre><code>$ kubectl rollout history deploy nginx-deployment
deployment.apps/nginx-deployment
REVISION  CHANGE-CAUSE
1         &lt;none&gt;
2         &lt;none&gt;
</code></pre>

<p>update again  </p>

<pre><code>$ kubectl rollout undo deploy nginx-deployment
deployment.apps/nginx-deployment rolled back
</code></pre>

<pre><code>$ kubectl rollout history deploy nginx-deployment
deployment.apps/nginx-deployment
REVISION  CHANGE-CAUSE
2         &lt;none&gt;
3         &lt;none&gt;

$ kubectl rollout undo deploy nginx-deployment --to-revision=1
error: unable to find specified revision 1 in history
</code></pre>

<p>You'll only see 5 results if you have updated it atleast 4 times.</p>

<p>Steps to reproduce:</p>

<p>Deploy the given nginx deployment</p>

<pre><code>❯❯❯ kubectl rollout history deploy nginx-deployment                                                                                                          
deployment.extensions/nginx-deployment 
REVISION  CHANGE-CAUSE
1         &lt;none&gt;
</code></pre>

<p>update deployment</p>

<pre><code>❯❯❯ kubectl rollout history deploy nginx-deployment                                                                                                              
deployment.extensions/nginx-deployment 
REVISION  CHANGE-CAUSE
1         &lt;none&gt;
2         &lt;none&gt;
</code></pre>

<p>update deployment</p>

<pre><code>❯❯❯ kubectl rollout history deploy nginx-deployment                                                                                                              
deployment.extensions/nginx-deployment 
REVISION  CHANGE-CAUSE
1         &lt;none&gt;
2         &lt;none&gt;
3         &lt;none&gt;
</code></pre>

<p>update deployment</p>

<pre><code>❯❯❯ kubectl rollout history deploy nginx-deployment                                                                                                              
    deployment.extensions/nginx-deployment 
    REVISION  CHANGE-CAUSE
    1         &lt;none&gt;
    2         &lt;none&gt;
    3         &lt;none&gt;
    4         &lt;none&gt;
</code></pre>

<p>update deployment</p>

<pre><code>❯❯❯ kubectl rollout history deploy nginx-deployment                                                                                                              deployment.extensions/nginx-deployment 
    REVISION  CHANGE-CAUSE
    1         &lt;none&gt;
    2         &lt;none&gt;
    3         &lt;none&gt;
    4         &lt;none&gt;
    5         &lt;none&gt;
</code></pre>
