Use Helm to deploy an Aerospike Backup Service on Kubernetes
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.
Breaking changes in Aerospike Backup Service Helm chart version 4.0.0:
- It no longer creates the service account
aerospike-backup-service
. Create the service account before deploying/upgrading the ABS by following this step.
Requirements
Before deploying your Aerospike Backup Service (ABS) using Helm, 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
values.yaml
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 Helm chart values.yaml.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.
Add the Helm repository to get the Helm charts.
helm repo add aerospike https://aerospike.github.io/aerospike-kubernetes-enterprise
If the Helm repository is already added, update the index:
helm repo update
Prepare
values.yaml
for ABS.Create a custom
values.yaml
file with your required configurations. The following is an example customvalues.yaml
file.image:
repository: aerospike/aerospike-backup-service
tag: "3.0.0"
backupServiceConfig:
service:
http:
port: 8080
backup-policies:
test-policy:
parallel: 3
storage:
local:
local-storage:
path: /localStorage
# s3Storage: # Uncomment below lines to use S3 storage
# s3-storage:
# bucket: aerospike-kubernetes-operator-test
# s3-region: us-east-1
# s3-profile: default
#secrets:
# - secretName: aws-secret
# volumeMount:
# name: aws-secret
# mountPath: /root/.aws/credentials
# subPath: credentials
service:
type: ClusterIPDeploy ABS.
Install the Helm chart with custom values.
helm install aerospikebackupservice-sample aerospike/aerospike-backup-service -f PATH_TO_CUSTOM_YAML_FILE
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
aerospikebackupservicesample 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
aerospikebackupservicesample-7b7f7b5648-kpfxh 1/1 Running 0 43s
Configurations
For more details on these configurations, see the Aerospike Backup Service Configuration Settings.
Name | Description | Default |
---|---|---|
image.repository | Aerospike backup service container image repository | aerospike/aerospike-backup-service |
image.tag | Aerospike backup service container image tag | 3.0.0 |
customLabels | Custom labels to add on the Aerospike backup service resource | {} (nil) |
backupServiceConfig | Aerospike backup service configuration | {} (nil) |
secrets | Secrets to be mounted in the Aerospike backup service pod such as AWS credentials | [] (nil) |
resources | Aerospike backup service pod resource requirements | {} (nil) |
service | Kubernetes service configuration for Aerospike backup service | {} (nil) |
podSpec | Aerospike backup service pod configuration | {} (nil) |