YAML configuration mapping for Aerospike on Kubernetes
For the complete documentation index see: llms.txt
All documentation pages available in markdown.
Mapping between YAML and Aerospike configuration
Kubernetes uses YAML configuration files, while Aerospike Database uses aerospike.conf.
Aerospike Kubernetes Operator (AKO) translates spec.aerospikeConfig from YAML into that format.
Applies to
This reference applies to AKO-managed Aerospike Database Enterprise Edition and Federal Edition 6.0 and later.
It is intended for Kubernetes users who configure spec.aerospikeConfig in an AerospikeCluster custom resource (CR).
AKO validates the configuration against the schema for the Database version specified by spec.image.
Check the Database configuration reference for each parameter’s type, unit, allowed values, constraints, and version availability.
See AKO limitations for restrictions on AKO-managed clusters.
Translation conventions
AKO uses the following conventions to translate YAML into the Database aerospike.conf format.
Integer values
In spec.aerospikeConfig, numeric parameters with units must be plain integers.
Specify size parameters as byte counts in binary units, such as 1073741824 for 1 GiB.
Specify time parameters in the unit documented for each parameter.
For example, default-ttl and nsup-period use seconds.
The following configuration sets default-ttl to one day and nsup-period to two minutes:
namespaces: - name: test default-ttl: 86400 nsup-period: 120Set filesize: 1073741824 for 1 GiB:
namespaces: - name: test storage-engine: type: memory files: - /opt/aerospike/data/test.dat filesize: 1073741824Simple key-value pairs
Most simple key-value pairs translate directly, as shown in the following examples.
YAML
replication-factor: 2aerospike.conf
replication-factor 2Storage sizes
File and device sizes in YAML must be plain integers that represent byte counts in binary units.
When AKO writes aerospike.conf, it preserves those values as integers.
Outside an AKO-managed deployment, a directly authored aerospike.conf file can use K, M, G, or T suffixes for binary units.
YAML
filesize: 4294967296 # 4 GiBaerospike.conf
filesize 4294967296Lists of simple values
For a list of simple values, use the plural key and a YAML list.
AKO writes each item to aerospike.conf by repeating the same configuration key multiple times.
YAML
addresses: - 192.168.1.1 - 192.168.5.1files: - /opt/aerospike/ns1.dat - /opt/aerospike/ns2.dataerospike.conf
address 192.168.1.1address 192.168.5.1file /opt/aerospike/ns1.datfile /opt/aerospike/ns2.datFixed sections
Aerospike configuration groups related settings into fixed sections. In YAML, represent each fixed section as a map of key-value pairs.
YAML
service: service-threads: 4 proto-fd-max: 15000aerospike.conf
service { proto-fd-max 15000 service-threads 4}Named sections
aerospike.conf can contain multiple named sections, such as namespace, dc, and set.
In YAML, represent them as a list of maps under the plural section name.
YAML
namespaces: - name: test replication-factor: 2 storage-engine: type: memory files: - /opt/aerospike/data/test1.dat - /opt/aerospike/data/test2.dat filesize: 4294967296 - name: bar replication-factor: 2 storage-engine: type: memory data-size: 4294967296aerospike.conf
namespace test { replication-factor 2 storage-engine memory { filesize 4294967296 file /opt/aerospike/data/test1.dat file /opt/aerospike/data/test2.dat }}namespace bar { replication-factor 2 storage-engine memory { data-size 4294967296 }}Typed sections
Some aerospike.conf sections, such as storage-engine and index-type, accept one value from a fixed set.
In YAML, represent each typed section as a map with a type property.
Use the same allowed values as the corresponding aerospike.conf section.
YAML
namespaces: - name: test storage-engine: type: memory files: - /opt/aerospike/data/test1.dat - /opt/aerospike/data/test2.dat filesize: 4294967296aerospike.conf
namespace test { storage-engine memory { filesize 4294967296 file /opt/aerospike/data/test1.dat file /opt/aerospike/data/test2.dat }}Aerospike logging section
Aerospike Database supports three log destinations, or sinks: file, console, and syslog.
Database 6.3.0 introduced the syslog sink.
Set name to console or syslog.
For a file sink, set name to the filename.
Add logging contexts and levels as key-value pairs.
For more information, see Log management.
YAML
logging: - name: console any: info - name: /var/log/aerospike/aerospike.log any: info tls: debug - name: syslog audit: info facility: local0 tag: aerospike-audit path: /dev/logaerospike.conf
logging { console { context any info } file /var/log/aerospike/aerospike.log { context any info context tls debug } syslog { context audit info facility local0 path /dev/log tag aerospike-audit }}Complete spec.aerospikeConfig example
The following YAML is the value of spec.aerospikeConfig, not a complete AerospikeCluster CR.
The example assumes a dedicated cross-datacenter replication (XDR) user named xdr-user with permissions for the test destination namespace.
AKO generates equivalent aerospike.conf content.
Whitespace and key ordering can differ between AKO releases.
YAML
service: proto-fd-max: 15000
security: {}
logging: - name: console any: info - name: /var/log/aerospike/aerospike.log any: info
xdr: dcs: - name: dc1 node-address-ports: - aeroclusterdst-0-0 3000 auth-user: xdr-user auth-password-file: /etc/aerospike/secret/password_xdr-user.txt auth-mode: internal namespaces: - name: test
namespaces: - name: test replication-factor: 2 storage-engine: type: memory files: - /opt/aerospike/data/test.dat filesize: 4294967296
mod-lua: user-path: /opt/aerospike/usr/udf/luaaerospike.conf
logging { console { context any info } file /var/log/aerospike/aerospike.log { context any info }}
mod-lua { user-path /opt/aerospike/usr/udf/lua}
namespace test { replication-factor 2 storage-engine memory { filesize 4294967296 file /opt/aerospike/data/test.dat }}
security {}
service { proto-fd-max 15000}
xdr { dc dc1 { auth-mode internal auth-password-file /etc/aerospike/secret/password_xdr-user.txt auth-user xdr-user node-address-port aeroclusterdst-0-0 3000 namespace test { } }}