Backing up a deployment on kubernetes

1/6/2020

I've been fiddling around with kubernetes a bit and a question I can't seem to understand (after some light reading) is that how would I even start or plan to backup a deployment?

For example, if im using this docker image in kubernetes : https://hub.docker.com/_/wordpress/

How would i back that image up inside kubernetes so that i don't lose the data?

With a custom app - i dont have to worry about anything because my it's all stateless and my database is not inside kubernetes. Because i dont know how to manage backups im still not fully confident about using kubernetes

Any information is appreciated regarding kubernetes backups

-- Aaron
kubernetes

4 Answers

1/22/2020

I would highly recommend checkout out what Kasten does. We focus on making backup/restore and disaster recovery extremely easy and secure for Kubernetes and have full CSI Snapshot support built in too. The demo video might help answer how your concerns would be addressed.

-- Niraj Tolia
Source: StackOverflow

1/6/2020

If I understand well, your question is in fact :
How do I backup my data ?

Then, the answer is pretty simple : Volumes !
Have a look at all the different type of volumes in Kubernetes and use the one that suits the most your needs.

You'll find everything you need in the official documentation

-- Marc ABOUCHACRA
Source: StackOverflow

1/6/2020

As per kubernetes 1.17 release announcement

The Kubernetes Volume Snapshot feature is now beta in Kubernetes v1.17

https://kubernetes.io/blog/2019/12/09/kubernetes-1-17-feature-cis-volume-snapshot-beta/

Kubernetes snapshot primitives act as basic building blocks that unlock the ability to develop advanced, enterprise grade, storage administration features for Kubernetes: including application or cluster level backup solutions.

So if you use kubernetes 1.17 then you can create stateful application with volumes and then use the new snapshots function to take point in time snap of attached volume to your application and then restore your application from snap when needed.

Refer "Creating a New Volume Snapshot with Kubernetes" and "Create Volume From Snapshot" section on above link.

-- DT.
Source: StackOverflow

1/6/2020

You can use Valero which backs up your Kubernetes cluster resources and persistent volumes.It also provides ability to restore,migrate and replicate your workload.

-- Arghya Sadhu
Source: StackOverflow