On demand backup using Xtrabackup not working - Kubernetes Toleration problems

I want to run a backup on demand using xtrabackup, following the percona documentation, I created this chart, but it has the problem that no matter what tolerations I put I put in, it doesn’t put anything in the pod, and therefore it can’t be scheduled.

> apiVersion: pxc.percona.com/v1
> kind: PerconaXtraDBClusterBackup
> metadata:
>   finalizers:
>     - delete-pxc-pods-in-order
>   name: prueba-xtradb
> spec:
>   pxcCluster: {{ .Release.Name }}
>   storageName: xtrabackup-test    
>    nodeSelector:
>      infra: staging
>    tolerations:
>    - key: "env"
>      operator: "equal"
>      effect: "NoSchedule"
>      value: "staging"
>      tolerationSeconds: 6000

I also tried with

>     tolerations:
>       - effect: NoSchedule
>         key: env
>         operator: Equal
>         value: staging

But it still doesn´t work, the pod cannot schedule because there are taints that the pod didn’t tolerate.

1 Like

Hello @Matias_Insaurralde ,

you can set tolerations through cr.yaml when configuring the storage.
In your case it should be like:

spec:
  ...
  backup:
    storages:
      xtrabackup-test:
        ...
        tolerations:
        - key: "env"
          operator: "equal"
          effect: "NoSchedule"
          value: "staging"
          tolerationSeconds: 6000

Please let me know if it helps.

1 Like