---
title: "Configuration settings for Aerospike Backup Service on Kubernetes"
description: "Guide to configuring Aerospike Backup Service on Kubernetes via Custom Resources for S3, local, and TLS setups."
---

# Configuration settings for Aerospike Backup Service on Kubernetes

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

Aerospike Backup Service (ABS) configuration settings are in the ABS CR file. Aerospike Kubernetes Operator (AKO) monitors this CR to deploy and update the backup service.

The [AerospikeBackupService Custom Resource Definition (CRD)](https://github.com/aerospike/aerospike-kubernetes-operator/blob/v4.7.0/config/crd/bases/asdb.aerospike.com_aerospikebackupservices.yaml) specifies the CR structure that AKO uses to manage the backup service.

## CR examples

CR examples are available in [the main Aerospike Kubernetes Operator repository](https://github.com/aerospike/aerospike-kubernetes-operator/tree/v4.7.0/config/samples).

### Example 1: CR with local storage

This example deploys a simple backup service using local storage.

Example 1

```yaml
apiVersion: asdb.aerospike.com/v1beta1

kind: AerospikeBackupService

metadata:

  name: aerospikebackupservice

  namespace: aerospike

spec:

  image: aerospike/aerospike-backup-service:3.7.0

  config:

    service:

      http:

        port: 8081

    backup-policies:

      test-policy:

        parallel: 3

      test-policy1:

        parallel: 3

    storage:

      local:

        local-storage:

          path: /tmp/localStorage

  service:

    type: ClusterIP
```

### Example 2: CR with S3 storage and static S3 credentials

This example deploys a simple backup service with S3 storage.

Example 2

```yaml
apiVersion: asdb.aerospike.com/v1beta1

kind: AerospikeBackupService

metadata:

  name: aerospikebackupservice

  namespace: aerospike

spec:

  image: aerospike/aerospike-backup-service:3.7.0

  config:

    service:

      http:

        port: 8081

    backup-policies:

      test-policy:

        parallel: 3

      test-policy1:

        parallel: 3

    storage:

      s3Storage:

        s3-storage:

          bucket: test-bucket

          s3-region: us-east-1

          s3-profile: default

  secrets:

    - secretName: aws-secret

      volumeMount:

        name: aws-secret

        mountPath: /home/absuser/.aws/credentials

        subPath: credentials

  service:

    type: ClusterIP
```

### Example 3: CR with S3 storage and IAM roles for Service Accounts (IRSA)

This example deploys a simple backup service with S3 storage.

Example 3

```yaml
apiVersion: asdb.aerospike.com/v1beta1

kind: AerospikeBackupService

metadata:

  name: aerospikebackupservice

  namespace: aerospike

spec:

  image: aerospike/aerospike-backup-service:3.7.0

  config:

    service:

      http:

        port: 8081

    backup-policies:

      test-policy:

        parallel: 3

      test-policy1:

        parallel: 3

    storage:

      s3Storage:

        s3-storage:

          bucket: test-bucket

          s3-region: us-east-1

  service:

    type: ClusterIP
```

### Example 4: CR with TLS-enabled Aerospike cluster

This example deploys a backup service configured to connect to a TLS-enabled Aerospike cluster. The TLS certificates are mounted from Kubernetes secrets.

Example 4

```yaml
apiVersion: asdb.aerospike.com/v1beta1

kind: AerospikeBackupService

metadata:

  name: aerospikebackupservice

  namespace: aerospike

spec:

  image: aerospike/aerospike-backup-service:3.7.0

  config:

    service:

      http:

        port: 8081

    backup-policies:

      test-policy:

        parallel: 3

    storage:

      local:

        local-storage:

          path: /tmp/localStorage

  secrets:

    - secretName: aerospike-secret

      volumeMount:

        name: aerospike-secret

        readOnly: true

        mountPath: /etc/aerospike/secret

  service:

    type: ClusterIP
```

### Example 5: CR with the backup service HTTPS listener

This example serves the ABS API over HTTPS, and AKO connects to the HTTPS listener with [`operatorClientCert`](#operator-client-certificate). The `abs-tls` Secret holds the backup service certificate and key. The `operator-tls` Secret holds the CA certificate that signed the backup service certificate. To serve HTTPS only, set `service.http.disabled: true`.

Example 5

```yaml
apiVersion: asdb.aerospike.com/v1beta1

kind: AerospikeBackupService

metadata:

  name: aerospikebackupservice-tls-sample

  namespace: aerospike

spec:

  image: aerospike/aerospike-backup-service:3.7.0

  config:

    service:

      http:

        port: 8081

      https:

        port: 8443

        cert-file: /etc/abs-tls/tls.crt

        key-file: /etc/abs-tls/tls.key

        # For mutual TLS, uncomment these lines and set clientCertFilename

        # and clientKeyFilename in operatorClientCert.

        # client-ca-file: /etc/abs-tls/ca.crt

        # client-auth: require-and-verify

    backup-policies:

      test-policy:

        parallel: 3

    storage:

      local:

        local-storage:

          path: /tmp/localStorage

  secrets:

    - secretName: abs-tls

      volumeMount:

        name: abs-tls

        mountPath: /etc/abs-tls

        readOnly: true

  operatorClientCert:

    secretCertSource:

      secretName: operator-tls

      caCertsFilename: ca.crt

      # clientCertFilename: tls.crt

      # clientKeyFilename: tls.key
```

## Configuration

The initial part of the CR file selects the CRD and the namespace to use for the ABS.

```yaml
apiVersion: asdb.aerospike.com/v1beta1

kind: AerospikeBackupService

metadata:

  name: aerospikebackupservice

  namespace: aerospike
```

The rest of this page explains the parameters in the subsequent parts of the CR file. See [ABS configuration reference](https://aerospike.com/docs/database/tools/backup-and-restore/backup-service/config) for a list of all configuration parameters for ABS.

Some parameters are tagged with **`Rolling restart`**, which means that they will trigger a rolling restart of backup service pods if changed.

## Spec

The spec section defines the configuration parameters for backup service deployment.

| Field | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| image  
**`Rolling restart`** | Yes | String |  | Container image of Aerospike Backup Service to run. Use a tag from the [Aerospike Backup Service image repository](https://hub.docker.com/r/aerospike/aerospike-backup-service) (for example, `aerospike/aerospike-backup-service:3.7.0`). |
| [config](#config) | Yes | Structure |  | Aerospike backup service configuration in freeform YAML format. |
| [podSpec](#pod-spec)  
**`Rolling restart`** | No | Structure |  | Specify additional configuration for the AerospikeBackupService pod |
| resources  
**`Deprecated`** **`Rolling restart`** | No | Structure [ResourceRequirements](https://pkg.go.dev/k8s.io/api/core/v1#ResourceRequirements) | nil | Configures resource requirements and limits like CPU or memory for the Aerospike backup service container. |
| [secrets](#secrets)  
**`Rolling restart`** | No | Structure | nil | List of secret to be mounted in the backup service. |
| [service](#service) | No | Structure | nil | Kubernetes service configuration for the backup service. |
| [operatorClientCert](#operator-client-certificate) | No | Structure | nil | TLS settings that AKO uses to connect to the backup service HTTPS listener. When not set, AKO connects to the HTTP listener. |

### Config

[`spec`](#spec) -> `config`

The YAML form of ABS configuration. The following fields can be defined in the ABS configuration:

-   `service`
-   `backup-policies`
-   `storage`
-   `secret-agents`

Example:

```yaml
config:

  service:

    http:

      port: 8081

  backup-policies:

    test-policy:

      parallel: 3

    test-policy1:

      parallel: 3

  storage:

    s3Storage:

      s3-storage:

        bucket: test-bucket

        s3-region: us-east-1

        s3-profile: default
```

See [Configure ABS](https://aerospike.com/docs/database/tools/backup-and-restore/backup-service/configure) for more details.

### Pod Spec

[`spec`](#spec) -> `podSpec`

Specify additional configuration for the AerospikeBackupService pod.

| Field | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| [serviceContainer](#service-container)  
**`Rolling restart`** | No | Structure |  | Configures the backup service container. |
| [metadata](#metadata)  
**`Rolling restart`** | No | Structure |  | Metadata to add to the pod. |
| affinity  
**`Rolling restart`** | No | Kubernetes Pod [Affinity](https://pkg.go.dev/k8s.io/api/core/v1#Affinity) |  | Kubernetes Affinity rules for pod placement. These rules are merged with affinity rules that AKO generates. See [the OLM documentation on affinity](https://olm.operatorframework.io/docs/advanced-tasks/overriding-operator-pod-affinity-configuration/) for examples. |
| tolerations  
**`Rolling restart`** | No | Kubernetes Pod [Tolerations](https://pkg.go.dev/k8s.io/api/core/v1#toleration) |  | Kubernetes Toleration for Aerospike pod placement. |
| nodeSelector  
**`Rolling restart`** | No | Map of string to string |  | [Node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) constraints for the Aerospike pods. |
| serviceAccountName  
**`Rolling restart`** | No | String | aerospike-backup-service | The name of the ServiceAccount to use to run the backup service pod. |
| imagePullSecrets  
**`Rolling restart`** | No | List of [LocalObjectReference](https://pkg.go.dev/k8s.io/api/core/v1#LocalObjectReference) |  | List of references to secrets in the same namespace to use for pulling images used by the pod. |

### Service container

[`podSpec`](#pod-spec) -> `serviceContainer`

Configures the backup service container.

| Field | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| securityContext  
**`Rolling restart`** | No | [SecurityContext](https://pkg.go.dev/k8s.io/api/core/v1#SecurityContext) |  | Defines the security context for the backup service container. |
| resources  
**`Rolling restart`** | No | [ResourceRequirements](https://pkg.go.dev/k8s.io/api/core/v1#ResourceRequirements) |  | Defines the requests and limits for the backup service container. Resources.Limits > Resources.Requests. |

### Metadata

[`podSpec`](#pod-spec) -> `metadata`

Metadata to add to the pod.

| Field | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| annotations  
**`Rolling restart`** | No | Map of string to string |  | Kubernetes Annotations |
| labels  
**`Rolling restart`** | No | Map of string to string |  | Kubernetes Labels |

### Secrets

[`spec`](#spec) -> `secrets`

Configure the secrets and their mount paths to mount the secrets in the container.

| Field | Required | Type | Description |
| --- | --- | --- | --- |
| secretName  
**`Rolling restart`** | Yes | String | The name of the secret. |
| volumeMount  
**`Rolling restart`** | Yes | Structure [corev1.VolumeMount](https://pkg.go.dev/k8s.io/api/core/v1#VolumeMount) | Secret volume mount options. |

Example:

```yaml
secrets:

- secretName: auth-secret

  volumeMount:

    name: auth-secret

    mountPath: /etc/aerospike/secret
```

### Service

[`spec`](#spec) -> `service`

Configure the Kubernetes service for the backup service.

| Field | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| type | Yes | String | ClusterIP | The type of the Kubernetes service. |

### Operator client certificate

[`spec`](#spec) -> `operatorClientCert`

Configure how AKO connects to the backup service [HTTPS listener](https://aerospike.com/docs/database/tools/backup-and-restore/backup-service/configure#https-server). The HTTPS listener requires ABS 3.7.0 or later. When `operatorClientCert` is set, AKO connects to the `service.https` listener in [`config`](#config). When it is not set, AKO connects to the `service.http` listener. AKO exposes every enabled listener on the backup service Deployment and Kubernetes Service, with the port names `http` and `https`.

| Field | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| [secretCertSource](#secret-cert-source) | Yes | Structure |  | The Secret that holds the TLS files AKO uses to connect to the backup service. |
| tlsName | No | String | _NAME_._NAMESPACE_.svc | Hostname that AKO expects in the backup service certificate. The default is the `AerospikeBackupService` address that AKO connects to. Set it when the certificate doesn’t list that name, for example when it is issued only for _NAME_._NAMESPACE_.svc.cluster.local or for an external DNS name. |

#### Secret cert source

[`operatorClientCert`](#operator-client-certificate) -> `secretCertSource`

Each `*Filename` field is a key in the Secret’s `data`, such as `ca.crt`. AKO reads the Secret on every request to the backup service, so rotated certificates take effect without restarting AKO.

| Field | Required | Type | Description |
| --- | --- | --- | --- |
| secretName | Yes | String | Name of a Secret in the namespace of the `AerospikeBackupService`. |
| caCertsFilename | No | String | Key of the CA certificate that signed the backup service certificate. When set, AKO trusts only this CA. When not set, AKO uses the system CA certificates. |
| clientCertFilename | No | String | Key of the client certificate AKO presents for mutual TLS. Required when `service.https.client-auth` is `require-and-verify`. Set it together with `clientKeyFilename`. |
| clientKeyFilename | No | String | Key of the private key for `clientCertFilename`. |