100-Days-Of-DevOps-Challenge-KodeKloud

Execute Rollback in Kubernetes Cluster

Earlier today, the Nautilus DevOps team deployed a new release for an application. However, a customer has reported a bug related to this recent release. Consequently, the team aims to revert to the previous version.

Steps

  1. Let’s see the deployments and pods

     kubectl get deployments.apps
     kubectl get pods
    
  2. Let’s see current container image version

     kubectl describe pods pod-name
    
  3. To roll back the deployment to our last working version, we can use the following command:

     kubectl rollout undo deployments/nginx-deployment
    

    It will move back to prevous version of deployments

Good to Know?

Rollback Operations

Rollback Commands

Revision Management

Rollback Scenarios