DISASTER RECOVERY
Tags: kubernetes, devops, webdev, dok
Published: 2022-02-27 13:15:58

Have you ever wondered or encountered a situation, that is you are working on
some cool project or doing some really important work on your local machine and
suddenly there is a power cut. This makes you anxious as it may be possible that
you haven’t saved the current state of your work on a local machine.
This thing happened to me the first time when I was in my 9th standard, preparing
PPT for my English project. I forgot to save my work and there is a power cut and
suddenly when the power comes I encounter that Microsoft ppt is asking to save the
latest changes done in a project. I just saved it. But at that time I didn’t even think
about how these things are working.
Today I have watched a video on youtube about disaster recovery on the Dok community youtube channel. where Atharv Karajgi sir has talked about Disaster Recovery plans and how these problems can be solved using orchestrated tools like Kubernetes.
where he started the discussion with a similar situation that I have encountered years ago that is Imagine a situation you are just going to bed thinking to have a sound sleep after working so long but suddenly you got a phone call saying there is
something wrong with the infrastructure or something not working /crashed at your place.
So, you must be wondering in today's technical world how these backups and recovery things are working.
**Some of the points that I have noted from the video that will surely answer these
questions:**
1. Earlier Backup and recovery were done on a virtual machine level, this used to work on the traditional application when these applications used to run on a single virtual machine. But nowadays we have containerized applications that are managed by an orchestrated tool like Kubernetes. So that means our earlier
systems fall apart . so effective disaster recovery plans for Kubernetes must be designed for containerized architecture this is why we need disaster recovery plans.
2. Kubernetes: developed by Google, it was open-sourced in 2014, maintainers of Kubernetes are the CNCF foundation. It was written in Go lang.
**3. Why has the use of containerize technologies increased?
DISASTER/DATA Recovery **
The rise of microservices causes the increased use of containerize technologies because containers offer the perfect host for small independent applications like microservice. and the list of containers and microservice technology resulted in an application that they are considered in hundreds or even in thousands .so to manage loads of containers across multiple environments using scripts and self-made tools is a bit tedious and complex so that is where we need orchestrated tools like Kubernetes.
One of the main features of this tool is Disaster/data recovery, Disaster recovery means that in any case if the infrastructure has some problem like data server loss or server explosion. In such a case there has to be some sort of mechanism to pick
the data from the last state and restore it to the latest state so that the application won’t lose any data.
How Data recovery will be done using Kubernetes?
This can be understood by understanding the basic architecture of the Kubernetes
Cluster.
It has an entry point which is an API server and a component called Controller
manager which keeps track of whatever happening in the Kubernetes cluster.
and it has a scheduler that ensures the perfect block placement.
lastly, it has ETCD, it is a key player in the whole backing up and restoring of the
Kubernetes cluster.

## Basic Working of ETCD
ETCD holds the current state value of the Kubernetes cluster and it has all configuration data inside and store data of each node and container inside the node.
The backup and Restore were made from ETCD snapshots. So, the whole cluster can be recovered using ETCD snapshots. the whole mechanism of disaster recovery
takes place by creating ETCD backups and by storing them in remote storage in the form of snapshots. and this role is managed by the Kubernetes cluster administrator.
So, in the end, it can be understood from this write-up how important is disaster
recovery plans.
Orchestrated tool, cluster, containerize tools, ETCD these are new terms to beginner like me , that I need to understand more.
Checkout the video on youtube:[ https://youtu.be/hkiyU_l78TI](url)
also if you can join the community on slack : [https://go.dok.community/slack](url)