I have deployed Cockroach db database in google Kubernetes engine, and now i want to backup that database daily purpose. I want to backup database from Kubernetes and upload that database dump to my google storage bucket. Suggest me if anyone have any idea about it.
Yes, it is possible to perform a daily backup of a database in GKE. There are different approaches.
The easiest solution is to just write a little script that executes pg_dump to export the database directly to Google Cloud Storage. Containerize the script, run it as a job. Run the job everyday.
To run the job every day, you would have to write a cron job pod. Hence, the job will be performed every day. The database will be backed-up everyday.