There you are: A tool to backup, migrate, or clone your PVs inside an OpenShift Kubernetes cluster!
When BackupEr starts, it runs the backup.sh script to copy the data from MyPod’s source PVC to its own target PVC. This pod is responsible for running the backup script.Īs you can see in the above image, the BackupEr pod has access to the PVC of the MyPod pod that is deployed in the OpenShift Project creatively named MyProject. The core component is a pod based on a custom container image.
#Controlplane backup archive
Note that this solution addresses only backing up and migrating user volumes, not Kubernetes control plane data and configuration, such as etcd. This post describes the PVC backup system I put together. Clone your PVC as many times as you want.Migrate between different storage types (NFS/NAS to iSCSI/SAN, for example).Backup your current PVC in another PVC.In short, this solution makes it easy to:
#Controlplane backup install
Other solutions need to install custom components (often a centralized control plane server and their own CLI tool).įor this reason I decided to implement a homemade solution.It implies development changes: You need to apply the sidecar pattern to your custom templates (or the templates that come out of the box with OpenShift), custom resources, … as the architecture of the solution needs that pattern to work.Security: As a basic means of reducing the exposed surface, we avoided anything that relied on Kubernetes NodePorts or privileged pods.We wanted to avoid this if possible, ideally using open-source software. Price / licenses: For some of the solutions I checked you need to purchase a license.The existing options I checked didn’t fit my needs for a variety of reasons: There are some third-party products and projects that address some of these needs, such as Velero, Avamar, and others, but none of them were a complete fit for our requirements. I wanted to share the challenges we faced in putting together the OpenShift backups, restores, hardware migrations, and cluster-cloning features we needed to preserve users’ Persistent Volume Claims (PVCs).Īt the moment, these features are not implemented directly in Kubernetes, and it doesn't come out-of-the-box with any Kubernetes distribution.
I recently implemented a complete backup solution for our Red Hat OpenShift clusters.