Skip to content

Take backups of MongoDB and upload to GCS which runs in Kubernetes

Notifications You must be signed in to change notification settings

vikramsomavaram/k8s-gcs-mongodb-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes MongoDB backups

This Script is used to backup mongoDB and upload it to Google Cloud Storage which runs as a cronjob in Kubernetes cluster

Steps

  • Create a bucket in Google Cloud Storage to upload the backups

  • Create Google cloud service account with credentials and access permisions for GCS (Storage Object Creator, Storage Object Viewer):

  • Create kubernetes secret in your kubernetes cluster to store Service Account Credentials: kubectl create secret generic gcs-key --from-file=key.json=.json

  • Replace the env in mongodb-cron.yaml

  • Apply mongodb-cron.yaml to your kubernetes cluster: kubectl apply -f mongodb-cron.yaml

About

Take backups of MongoDB and upload to GCS which runs in Kubernetes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published