PITR in Kubernetes Cluster not being taken - Operator not found

I have PITR enabled as per documentation:


backup:
  enabled: true
  restartOnFailure: true
  image:
    repository: percona/percona-server-mongodb-operator
    tag: 1.11.0-backup
  serviceAccountName: percona-server-mongodb-operator
  resources:
  limits:
    cpu: "2500m"
    memory: "4Gi"
  requests:
    cpu: "256m"
    memory: "0.256Gi"
  storages:
    my-s3:
      type: s3
      s3:
        bucket: my-bucket
        credentialsSecret: my-secret
        endpointUrl: my-url
  pitr:
    enabled: true
  tasks:
   - name: daily
     enabled: true
     schedule: "0 0 * * *"
     keep: 30
     storageName: my-s3
     compressionType: gzip

When I do: kubectl describe psmdb-backup, I see latest backup was take a month ago, which was the manual backup I did back then, to proove S3 connection works fine.

I then do:

kubectl describe job.batch/percona-db-psmdb-db-backup-daily-27427680 and get:

Events:
  Type     Reason        Age                     From            Message
  ----     ------        ----                    ----            -------
  Warning  FailedCreate  7m47s (x3811 over 15d)  job-controller  Error creating: pods "percona-db-psmdb-db-backup-daily-27427680-" is forbidden: error looking up service account default/percona-server-mongodb-operator: serviceaccount "percona-server-mongodb-operator" not found
  Warning  FailedCreate  54s (x4 over 2m4s)      job-controller  Error creating: pods "percona-db-psmdb-db-backup-daily-27427680-" is forbidden: error looking up service account default/percona-server-mongodb-operator: serviceaccount "percona-server-mongodb-operator" not found

I then do: kubectl describe sa percona-operator-psmdb-operator and get:

Name:                percona-operator-psmdb-operator
Namespace:           default
Labels:              app.kubernetes.io/managed-by=Helm
Annotations:         meta.helm.sh/release-name: percona-operator
                     meta.helm.sh/release-namespace: default
Image pull secrets:  <none>
Mountable secrets:   percona-operator-psmdb-operator-token-sbl45
Tokens:              percona-operator-psmdb-operator-token-sbl45
Events:              <none>

What could the problem be in this case?

1 Like

The solution was to fix the name mismatch between the helm chart and the actual service account name as described in this thread: Backup task used wrong sa ?!

This should be fixed in the helm chart. I don’t remember changing the key serviceAccountName in the helm chart.

1 Like