Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect REVISION sequence number under section "Updating a Deployment" #4

Open
usmangt opened this issue Jun 9, 2023 · 0 comments

Comments

@usmangt
Copy link

usmangt commented Jun 9, 2023

When going through the example of Updating a Deployment

Just before the "Undo a change" subheading the example have the correct output:

controlplane $ kubectl rollout history deployment nginx
deployment.apps/nginx 
REVISION  CHANGE-CAUSE
1         <none>
2         kubectl set image deployment nginx nginx=nginx:1.17 --record=true
3         kubectl edit deployments.apps nginx --record=true

Till here the REVISION sequence number is correct.

After that If we follow the instructions for the subheading "Undo a change"

The REVISION number is now changed:

controlplane $ kubectl rollout history deployment nginx
deployment.apps/nginx 
REVISION  CHANGE-CAUSE
1         
3         kubectl edit deployments.apps nginx --record=true
4         kubectl set image deployment nginx nginx=nginx:1.17 --record=true

This makes it very unclear and not possible to follow the example further.

The correct output should be:

controlplane ~ ➜  kubectl rollout history deployment 
deployment.apps/nginx 
REVISION  CHANGE-CAUSE
1         <none>
2         kubectl set image deployment nginx nginx=nginx:1.17 --record=true
3         kubectl edit deployments.apps nginx --record=true

Where, REVISION#3 is the current revision where we have deployed the nginx:latest version

controlplane ~ ➜  kubectl describe deployments. nginx | grep -i image:
    Image:        nginx:latest

To roll back to the previous version (nginx:1.17 which is REVISION#2) we use the rollout undo command:

controlplane ~ ➜  kubectl rollout undo deployment nginx --to-revision=2
deployment.apps/nginx rolled back

Now, checking the rollout history:

controlplane ~ ➜  kubectl rollout history deployment nginx
deployment.apps/nginx 
REVISION  CHANGE-CAUSE
1         <none>
3         kubectl edit deployments.apps nginx --record=true
4         kubectl set image deployment nginx nginx=nginx:1.17 --record=true

Verifying the currently deployment nginx version

controlplane ~ ➜  kubectl describe deployments.apps/nginx | grep -i image:
    Image:        nginx:1.17

Please fix it.

Feel free to let me know if you need any help!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant