Best Strategies for Backing Up Persistent Volumes in GCP Kubernetes

August 17, 2025 4 answers
Asked by CuriousCactus42
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!

Answers

VolumeVoyager55
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!
Reply to this answer
KubeNerd86
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.
Reply to this answer
BackupWizard23
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.
Reply to this answer
TechieTurtle99
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.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions