Aerospike Backup Service
AKO version 4.x or later does not support Aerospike Backup Service version 2.x. Upgrade to Aerospike Backup Service v3.0.0 or later. See Upgrade ABS for more information.
Overview
Aerospike Backup Service (ABS) is an external service that runs alongside an Aerospike Database deployment and manages backup and restore operations. It reads configurations in a YAML format. On a Kubernetes deployment, the configuration is provided in the ABS Custom Resource (CR) file.
Requirements
Before deploying ABS, install AKO on your Kubernetes cluster using either:
Install and deploy
We recommend using one ABS deployment per Aerospike cluster.
Create service account
Run the following command to create the ABS service account in the namespace where ABS is deployed.
kubectl create serviceaccount aerospike-backup-service -n aerospike
noteYou can use a different service account name. Refer to the ABS CR file to set the service account name.
Configure S3 backup storage (optional)
ABS supports S3 compatible storage as well as local storage for backups. If you use S3 compatible storage, add the credentials or roles to the ABS CR file so ABS can connect to the remote storage.
- S3 Static Credentials (Kubernetes Secrets)
- IAM Roles for Service Accounts (IRSA)
Create a Kubernetes secret with the S3 credentials.
kubectl -n aerospike create secret generic aws-secret --from-file=PATH_TO_AWS_CREDENTIALS
See the AWS documentation for the format of the credentials file.
Mount the
aws-secret
secret in the ABS pod by adding thesecrets
field in the ABS CR.secrets:
- secretName: aws-secret
volumeMount:
name: aws-secret
mountPath: /root/.aws/credentials
subPath: credentialsCreate and attach an IAM role with the required permissions to the ABS service account
aerospike-backup-service
. Change the serviceaccount and role ARN in the following example to the ARN of the IAM role you created.kubectl annotate serviceaccount -n aerospike aerospike-backup-service eks.amazonaws.com/role-arn=arn:aws:iam::123456789012:role/MyServiceRole
See the IRSA documentation for more information on IAM roles for service accounts.
Prepare your ABS CR file.
Aerospike publishes sample CR files in the main Aerospike Kubernetes Operator GitHub repository.
See Backup Service Configuration for details of the available configuration parameters.
You can edit the ABS CR file at any time to manage and change the backup service configuration.
Deploy ABS.
Run
kubectl apply
on the CR file you created to deploy ABS.kubectl apply -f aerospikebackupservice.yaml -n aerospike
Verify ABS status.
Run
kubectl get deployment
to check that AKO has created the ABS deployment.$ kubectl get deployment -n aerospike
NAME READY UP-TO-DATE AVAILABLE AGE
aerospikebackupservice-sample 1/1 1 1 9sRun
kubectl get pods
to check the pods to confirm the status. This step may take time as the pods provision resources, initialize, and become ready. Wait for the pods to switch to the Running state before you continue.$ kubectl get pods -n aerospike
NAME READY STATUS RESTARTS AGE
aerospikebackupservice-sample-7b7f7b5648-kpfxh 1/1 Running 0 43s
Next steps
Now that the backup service is running, you can use another CR file to perform a backup or a restore.