Rollback Kubernetes deployment to previous revision

Rollback Kubernetes deployment to previous revision

In this example we are going to deploy our application to Kubernetes and rollback to any given revision if something goes wrong with the most recent deployment. Important: When rolling back to a specific revision, the docker image gets pulled so make sure every image has a unique tag attached to it and referenced in deployment.yaml for each deployment.

In this example we are going to deploy our application to Kubernetes and rollback to any given revision if something goes wrong with the most recent deployment.

Important: When rolling back to a specific revision, the docker image gets pulled so make sure every image has a unique tag attached to it and referenced in deployment.yaml for each deployment. Every time you deploy a code, its image tag should be a new one. If you use latest, you will also have to manually revert the code first, push the image which is not a good practise and beats the purpose of rollback. In short, uniquely tag (e.g. git hash) the docker image, push it and use same tag in deployment.yaml file.

Revision History Limit

A Deployment's revision history is stored in its ReplicaSets.

The optional .spec.revisionHistoryLimit key controls how many ReplicaSets should be retained for rollback. The more ReplicaSets retained, the more resources in etcd is consumed so don't keep the numbers too high. By default, 10 old ReplicaSets will be kept.

kubernetes

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

50+ Useful Kubernetes Tools for 2020 - Part 2

Our original Kubernetes tool list was so popular that we've curated another great list of tools to help you improve your functionality with the platform.

Kubernetes in the Cloud: Strategies for Effective Multi Cloud Implementations

This article explains how you can leverage Kubernetes to reduce multi cloud complexities and improve stability, scalability, and velocity.

Kubernetes vs Docker

Get Hands-on experience on Kubernetes and the best comparison of Kubernetes over the DevOps at your place at Kubernetes training

Typical flow for deploying applications to Kubernetes

Get Hands-on experience on Kubernetes and the best comparison of Kubernetes over the DevOps at your place at Kubernetes training

Microsoft Announces General Availability Of Bridge To Kubernetes

Microsoft announced the general availability of Bridge to Kubernetes, formerly known as Local Process with Kubernetes.