Backup MySQL databases in Kubernetes

Backup MySQL databases in Kubernetes


As we are adopting more and more Databases in kubernetes scheme of things, we need to be more vigilant to the Database Management.  As part of our Database Management Job we need to keep the backup of the Databases, so we are safe in future if the need arises.
As i need to manage a Kubernetes cluster in IBM Cloud and have MySQL deployements in this cluster. I choose the kubernetes native  Cronjob Function to schedule my MySQL DB Backup.





For Traditional MySQL DB Backup/Restore Procedure, Please click Here.
For more details on schduling repitative Job through Kubernetes Cronjob, Please click here.

Lets Start :

We'll schdule the cronjob in the Kubernestes Cluster. You need to clone the mysqldump github repository. Then create the job by using following commands.

Create secret, configmap and job(s)


             kubectl create -f mysqldump/mysqldump.configmap.yaml
             kubectl create -f mysqldump/mysqldump.secret.yaml
             kubectl create -f mysqldump/mysqldump.scheduledjob.all.yaml

Check if the the cronjob is getting created.


kubectl get jobs --watch
Interesting Articles on Kubernetes:

Kubernetes : Kubernetes Node Management, Maintenance, Delete
How to add a  New Worker Node to a existing kubernetes Cluster
MinIO Client Installation and Quickstart
PLEG is not healthy: Kubernetes Worker Node is in "NotReady" state
Backup MySQL databases in Kubernetes
How to Run Automated Tasks in Kubernetes with a cronjob
How to Completely remove Kubernetes


References: https://www.camil.org/backup-and-restore-mysql-databases-using-kubernetes-cron-jobs/

0 Response to "Backup MySQL databases in Kubernetes"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel