Skip to main content

Create an Aerospike Cluster

This guide explains how to deploy Aerospike CE clusters using the AerospikeCluster CRD.

Sample Configurations

The simplest cluster: a single-node in-memory deployment.

apiVersion: acko.io/v1alpha1
kind: AerospikeCluster
metadata:
name: aerospike-ce-basic
namespace: aerospike
spec:
size: 1
image: aerospike:ce-8.1.1.1
aerospikeConfig:
namespaces:
- name: test
replication-factor: 1
storage-engine:
type: memory
data-size: 1073741824 # 1 GiB

Use case: Development, testing, quick prototyping.

kubectl create namespace aerospike
kubectl apply -f config/samples/acko_v1alpha1_aerospikecluster.yaml

Webhook Defaults

The operator's mutating webhook automatically sets the following defaults if not specified:

FieldDefault ValueDescription
aerospikeConfig.service.cluster-namemetadata.nameAerospike cluster name
aerospikeConfig.service.proto-fd-max15000Max client connections
aerospikeConfig.network.service.port3000Client service port
aerospikeConfig.network.heartbeat.port3002Heartbeat port
aerospikeConfig.network.heartbeat.modemeshHeartbeat mode
aerospikeConfig.network.fabric.port3001Fabric (inter-node) port
monitoring.exporterImageaerospike/aerospike-prometheus-exporter:1.16.1Exporter image (when monitoring enabled)
monitoring.port9145Exporter metrics port (when monitoring enabled)
monitoring.serviceMonitor.interval30sScrape interval (when ServiceMonitor enabled)
podSpec.multiPodPerHostfalseOne pod per node (when hostNetwork enabled)
podSpec.dnsPolicyClusterFirstWithHostNetDNS policy (when hostNetwork enabled)

CE Validation Rules

The validating webhook enforces Community Edition constraints:

RuleConstraintError
Cluster sizespec.size max 8spec.size N exceeds CE maximum of 8
Namespace countmax 2 namespacesnamespaces count N exceeds CE maximum of 2
XDRNot allowedmust not contain 'xdr' section
TLSNot allowedmust not contain 'tls' section
SecurityNot allowed (CE 8.x)must not contain 'security' section
Heartbeat modeMust be meshmust be 'mesh' for CE
ImageMust be CE image, CE 8+ onlyEnterprise Edition image not allowed, CE 7.x is no longer supported
Replication factormust not exceed spec.sizereplication-factor N exceeds cluster size
Replication factor range1 to 4must be between 1 and 4
Rack IDsMust be uniqueduplicate rack ID
Rack labelsMust be unique across racksduplicate rackLabel
OperationsMax 1 active at a timeonly one operation allowed
Operation ID1-20 charactersid must be between 1 and 20 characters
Operations (in-progress)Cannot modify while InProgresscannot modify operations while InProgress
scaleDownBatchSizeMust be positivemust be positive
rollingUpdateBatchSize (rackConfig)Must be positivemust be positive
maxIgnorablePodsMust be >= 0must not be negative

Enterprise-Only Namespace Keys

The following namespace configuration keys are blocked for CE:

KeyReason
compression, compression-levelData compression is Enterprise-only
durable-deleteDurable deletes is Enterprise-only
fast-restartFast restart is Enterprise-only
index-typeFlash/pmem index is Enterprise-only
sindex-typeFlash/pmem sindex is Enterprise-only
rack-idUse operator rackConfig instead
strong-consistencyStrong consistency is Enterprise-only
tomb-raider-eligible-age, tomb-raider-periodTomb-raider is Enterprise-only

Warnings

The webhook also emits warnings (non-blocking) for:

  • Untagged images or latest tag usage
  • hostNetwork=true with multiPodPerHost=true (port conflict risk)
  • hostNetwork=true with non-ClusterFirstWithHostNet DNS policy
  • data-in-memory=true (doubles memory usage)
  • rollingUpdateBatchSize greater than cluster size