Skip to main content
Version: 2.0.0

HDD Storage With Data In Index

This example sets up a specialized namespace where records have a single-bin and fit in 8 bytes. For more information on setting up HDD storage with data-in-index and other storage configurations, see the Aerospike documentation for namespace storage configuration.

To set this up, add the following storage-specific configuration to the Aerospike cluster's CR file.

  storage:
filesystemVolumePolicy:
cascadeDelete: true
initMethod: deleteFiles
volumes:
- name: workdir
aerospike:
path: /opt/aerospike
source:
persistentVolume:
storageClass: ssd
volumeMode: Filesystem
size: 1Gi
- name: nstest
aerospike:
path: /opt/aerospike/data/test
source:
persistentVolume:
storageClass: ssd
volumeMode: Filesystem
size: 3Gi
- name: nsbar
aerospike:
path: /opt/aerospike/data/bar
source:
persistentVolume:
storageClass: ssd
volumeMode: Filesystem
size: 3Gi
- 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: 2000000000
single-bin: true
data-in-index: true
replication-factor: 1
storage-engine:
type: device
files:
- /opt/aerospike/data/test/test.dat
filesize: 2000000000
data-in-memory: true
- name: bar
memory-size: 3000000000
single-bin: true
data-in-index: true
replication-factor: 1
storage-engine:
type: device
files:
- /opt/aerospike/data/bar/bar.dat
filesize: 2000000000
data-in-memory: true

For the full CR file, see the example HDD storage with data-in-index 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