Using xtrabckup in k8s


I would like to setup mysql and pxb running in k8s. the pxb should be running based on a schedule, e.g. daily, hourly, etc.
FYI, the k8s cluster is configured with pod security admission.

Hello @Charly_Wu,
You need to use our K8S operator. It includes HA MySQL, PXB, and a cron scheduler for taking backups.

Hi @matthewb,
Is the cron scheduler in the K8s operator implemented using k8s CronJob?

Hi, the operator manages backups on its own (it does not create cronjob object)


My current approach is as follows:

  1. Build a new image based on mysql image, install pxb and logrotate in the image.
  2. Setup one CronJob for pxb which share a data PV with mysql pod.
  3. setup one CronJob for logrotate which share a log PV with mysql pod.