Skip to main content
Loading
Version: Operator 2.2.0

Shadow Device

In cloud environments, the namespace storage engine can be configured to use extremely high-performance cloud instance-attached local SSDs. Under this setup, writes are duplicated to another network-attached shadow device for persistence in case the cloud instance terminates.

To set this up, follow the instructions in our storage provisioning guide to create a local volume provisioner and appropriate storage class.

For more information on using a shadow device and other storage configurations, see the Aerospike documentation for namespace storage configuration.

Next, add the following storage-specific configuration to the Aerospike cluster's CR file.

  storage:
filesystemVolumePolicy:
cascadeDelete: true
initMethod: deleteFiles
blockVolumePolicy:
cascadeDelete: true
volumes:
- name: workdir
aerospike:
path: /opt/aerospike
source:
persistentVolume:
storageClass: ssd
volumeMode: Filesystem
size: 1Gi
- name: nsvol1
aerospike:
path: /dev/nvme0n1
source:
persistentVolume:
storageClass: local-ssd
volumeMode: Block
size: 5Gi
- name: nsvol2
aerospike:
path: /dev/sdf
source:
persistentVolume:
storageClass: ssd
volumeMode: Block
size: 5Gi
- name: aerospike-config-secret
source:
secret:
secretName: aerospike-secret
aerospike:
path: /etc/aerospike/secret
.
.
.
aerospikeConfig:
service:
feature-key-file: /etc/aerospike/secret/features.conf
security: {}
namespaces:
- name: test
memory-size: 3000000000
replication-factor: 2
storage-engine:
type: device
devices:
- /dev/nvme0n1 /dev/sdf

For the full CR file, see the example shadow device cluster CR.

This and other example CRs are stored in the main Aerospike Kubernetes Operator repository.

Save and exit the CR file, then use kubectl to apply the change.

kubectl apply -f aerospike-cluster.yaml