Kubernetes: How do i initiate rollback for an application ?

0 votes
How do I initiate rollback for an application in kubernetes?
Jul 23 in Kubernetes by Karan
• 1,510 points
121 views

1 answer to this question.

0 votes

Rollback and rolling updates are a feature of Deployment object in the Kubernetes. 

We do the Rollback to an earlier Deployment revision if the current state of the Deployment is not stable due to the application code or the configuration. 

Each rollback updates the revision of the Deployment.

○ → kubectl get deploy
NAME    DESIRED  CURRENT UP-TO-DATE   AVAILABLE AGE
nginx   1  1 1            1 15h
○ → kubectl rollout history deploy nginx
deployment.extensions/nginx
REVISION  CHANGE-CAUSE
1         <none>
2         <none>
kubectl undo deploy <deploymentname>
○ → kubectl rollout undo deploy nginx
deployment.extensions/nginx
○ → kubectl rollout history deploy nginx
deployment.extensions/nginx
REVISION  CHANGE-CAUSE
2         <none>
3         <none>

We can also check the history of the changes by the below command:

kubectl rollout history deploy <deploymentname>
answered Jul 23 by Sirajul
• 19,670 points

Related Questions In Kubernetes

0 votes
1 answer
0 votes
1 answer

How do I sign-in to kubernetes dashboard?

Since version 1.7 Dashboard uses more secure ...READ MORE

answered Sep 7, 2018 in Kubernetes by DareDev
• 6,810 points
124 views
0 votes
1 answer
0 votes
1 answer

How do I create a service account for my dashboard and get all the credentails

Run the following commands: This command will create ...READ MORE

answered Oct 8, 2018 in Kubernetes by Kalgi
• 39,330 points
218 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
1,675 views
+3 votes
1 answer
0 votes
2 answers

How do I update all my pods if the image changed but the tag is the same? - Kubernetes

Make sure your imagePullPolicy is set to Always(this is the ...READ MORE

answered Aug 6 in Kubernetes by Sirajul
• 19,670 points
16 views