I'm tasked with creating a backup solution for a Kubernetes cluster hosted on Google Cloud (GCP). This cluster has around 3000 active pods, each with a 2GB persistent disk, like a service that hosts free websites. Our setup allows for pods to grow or shrink based on demand, and currently, we have approximately 40-50,000 volumes available, which we only delete if the pods haven't been used for a set time.
For backing up these volumes, I'm considering a couple of things. First, while our existing setup works, I wonder if utilizing shared storage might help reduce the number of volumes, although I worry this could sacrifice some of Kubernetes' benefits. Second, I'm looking for a reliable backup solution for recovering data when needed. I've thought about using Velero but have concerns over its ability to manage a large number of CRD objects.
Has anyone else faced a similar challenge? Any tips or suggestions would be greatly appreciated!
4 Answers
Have you checked if GCP has a built-in backup tool? It might be worth exploring that first before going for other options. Just remember, though, that dynamically reassigning PVs and PVCs to pods can complicate automated backups since restoration tends to be less automated. You might end up needing to write a custom operator for your specific needs.
I haven't personally used Velero, but I've heard good things about it. What you might find useful is Restic, which is part of Velero's backup options. Restic is super efficient as it creates encrypted, deduplicated backups. Plus, it supports various storage backends, so you could use GCP's object storage for your backups.
Also, I suggest considering choices based on Restic.
Are you looking to back up both your cluster and the contents of the PVCs? Your solution might depend a lot on the CSI you're currently using. For backing up the cluster, figuring out your recovery point objective (RPO) and recovery time objective (RTO) is crucial to select the right method. I haven't looked into Velero much, but I’d recommend researching the differences in restoring pods versus PVCs.
You might want to check out Volsync for your needs, as it offers specific features for backing up volumes effectively. Their documentation might provide useful insights!

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures