Kubernetes backup and restore: Velero

Recently I was working on a project wherein we had to perform a DR(Disaster Recovery) for our EKS(Elastic Kubernetes Service) infrastructure. We discovered a tool called Velero, this post should just be enough to get a picture of it. Herein are two people conversing,

John: Hey we need to backup and also restore our kubernetes cluster, not sure how we can go about this.

Amy: Hey I’ve heard Velero is a great backup and restore tool for Kubernetes cluster.

John: Third party tool , um , actually I am a little skeptical about it.

Amy: Sure. Well for starters it’s an open source project , so we’re good on the cost front. Plus the documentation itself is really helpful. This tool is used by a lot of companies who are running their applications on Kubernetes.

John: Hmm. That is good to know. So does it support all cloud providers ?

Amy: It is supported by AWS, GCP and Azure.

John: So what all “data” can we backup here? And where will this backup be stored ?

Amy: All your kubernetes objects, basically the containerised applications, which nodes they are running on, the policies associated. The backup itself will be stored in cloud storage like S3 in form of snapshots, you can schedule the backups as well.

John: Oh that sounds nice. So is it like I just apply the backup on let’s say an empty AWS account and voila it works!!??

Amy: Well, that’s almost correct just that your cluster in another region/account needs to be setup with a velero server running on the cluster. Then you can connect to the cluster and just apply the backup.

John: Hmm. What about the persistent volumes ? Does it backup that as well?

Amy: Yes! There is a tool called Restic we can utilise that.

John: Great Amy! This is worth a try. Thank a ton!

I hope this post helped you get an insight into just what Velero is capable of. I can work on some posts with code snippets as well, but nothing would do justice like the documentation.

Curious, driven, developer