• kubernetes: Rollback a deployment update

    2 min read

    kubectl rolling update history undo

    When performing rolling updates we can see it's history using kubectl rollout history:

    $ kubectl rollout history deploy pet2cattle
    deployment.apps/pet2cattle 
    REVISION  CHANGE-CAUSE
    100       <none>
    101       <none>
    102       <none>
    103       <none>
    104       <none>
    105       <none>
    106       <none>
    107       <none>
    109       kubectl scale deployment/pet2cattle --replicas=2 --record=true
    110       kubectl scale deployment/pet2cattle --replicas=5 --record=true
    111       kubectl scale deployment/pet2cattle --replicas=1 --record=true
    

    If have any problem with the update we can undo and update using kubectl rollout undo

    25/05/2021

    Read more...

From pet to cattle
Treat your kubernetes clusters like cattle, not pets