Best Practices for Backing Up Databases in Kubernetes

0
17
Asked By CuriousCoder42 On

We're transitioning to Kubernetes for our company's software platform and have noticed a lot of advantages, like teams being able to independently develop and deploy services. However, we're facing challenges managing backups for our databases, which are running as StatefulSets. We're evaluating Kasten K10 and Velero, but we're struggling with how to perform backups and, particularly, how to manage restores based on different points in time. It feels like we're up against a sort of paradox similar to the CAP theorem. Has anyone dealt with this issue, and how did you resolve it?

7 Answers

Answered By DatabaseDynamo23 On

Using the appropriate database tools is key for backing up your databases efficiently.

Answered By BackupBuff On

Velero has its limitations with StatefulSet databases since volume snapshots don't offer application awareness. You might need to implement pre-hooks for consistent database dumps. Kasten can handle this more smoothly. What specific databases are you using?

Answered By OpsExpert42 On

Database operators that come with built-in backup CRDs work great with Velero. The operator manages application-consistent snapshots while Velero handles orchestration, making point-in-time restores a lot cleaner. What database engines are you working with?

Answered By CloudNativeLeaves On

Don't forget about Volsync! It's particularly effective for data-only backups and restores, especially if you're implementing GitOps.

Answered By KubeGuru88 On

It's generally not advisable to run databases in Kubernetes for production unless you're using an operator that manages them effectively, like CNPG for Postgres. This allows you to perform point-in-time recovery or full backups easily.

Answered By DistributedDBKnight On

The restore issue with microservices can be tricky because each database can have its own timeline. Have you thought about using database-native tools like pg_dump through CronJobs in combination with Velero?

Answered By PostgresPal On

For our Postgres databases, we do point-in-time recovery using the Barman cloud plugin and the CNPG operator. It simplifies everything. Just make sure you have the plugin set up properly with a sidecar container.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.