Skip to main content
Loading
Version: Operator 3.3.0

Configuration Settings for an Aerospike Cluster on Kubernetes

Aerospike cluster configuration settings are in the Aerospike cluster Custom Resource (CR) file. The Aerospike Kubernetes Operator (AKO) reads this file to make changes to the cluster based on any changes in the file. The CR file is not required to be in any specific location on the server where you run Kubernetes since the command to update AKO with a new version of the file passes the entire file path to AKO. In the examples given in this documentation, the CR file (and all configuration files) are assumed to be in the same directory where you run kubectl commands.

The Operator Custom Resource Definition (CRD) specifies the CR structure that the Operator uses to manage the cluster.

CR examples

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

Example 1: Basic CR

This example creates a simple cluster with no storage, using data-in-memory (DIM).

Example 1
apiVersion: asdb.aerospike.com/v1
kind: AerospikeCluster
metadata:
name: aerocluster
namespace: aerospike
spec:
size: 2
image: aerospike/aerospike-server-enterprise:7.1.0.0

podSpec:
multiPodPerHost: true

storage:
filesystemVolumePolicy:
cascadeDelete: true
initMethod: deleteFiles
volumes:
- name: workdir
source:
persistentVolume:
storageClass: ssd
volumeMode: Filesystem
size: 3Gi
aerospike:
path: /opt/aerospike
- name: aerospike-config-secret
source:
secret:
secretName: aerospike-secret
aerospike:
path: /etc/aerospike/secret

aerospikeAccessControl:
users:
- name: admin
secretName: auth-secret
roles:
- sys-admin
- user-admin

aerospikeConfig:
service:
feature-key-file: /etc/aerospike/secret/features.conf
security: {}
network:
service:
port: 3000
fabric:
port: 3001
heartbeat:
port: 3002
namespaces:
- name: test
replication-factor: 2
storage-engine:
type: memory
data-size: 1073741824

Example 2: Rack-enabled CR

This more comprehensive sample CR is for a rack-enabled cluster. It has an additional rackConfig subsection under spec. See Rack Awareness for more information.

Example 2
apiVersion: asdb.aerospike.com/v1
kind: AerospikeCluster
metadata:
name: aerocluster
namespace: aerospike

spec:
size: 2
image: aerospike/aerospike-server-enterprise:7.1.0.0
rackConfig:
namespaces:
- test
racks:
- id: 1
# Change to the zone for your k8s cluster.
zone: us-west1-a
- id: 2
# Change to the zone for your k8s cluster.
zone: us-west1-b

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: ns
aerospike:
path: /test/dev/xvdf
source:
persistentVolume:
storageClass: ssd
volumeMode: Block
size: 5Gi
- name: aerospike-config-secret
source:
secret:
secretName: aerospike-secret
aerospike:
path: /etc/aerospike/secret

podSpec:
multiPodPerHost: true

aerospikeAccessControl:
users:
- name: admin
secretName: auth-secret
roles:
- sys-admin
- user-admin

aerospikeConfig:
service:
feature-key-file: /etc/aerospike/secret/features.conf
security: {}

network:
service:
port: 3000
heartbeat:
port: 3002
fabric:
port: 3001

namespaces:
- name: test
replication-factor: 2
storage-engine:
type: device
devices:
- /test/dev/xvdf
- name: testMem
replication-factor: 1
storage-engine:
type: memory
data-size: 1073741824

Configuration

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

apiVersion: asdb.aerospike.com/v1
kind: AerospikeCluster
metadata:
name: aerocluster
namespace: aerospike

The rest of this page explains the parameters in the subsequent parts of the CR file.

Spec

The spec section defines the cluster's configurations.

FieldRequiredTypeDefaultDescription
aerospikeAccessControl
Dynamic
NoStructureRequired if Aerospike security is enabled.
aerospikeConfig
Dynamic Rolling restart
YesStructureA freeform map conforming to the configuration schema for the deployed Aerospike Database version.
aerospikeNetworkPolicy
Dynamic Rolling restart
NoStructureConfigures IP addresses and port types for access and fabric.
disablePDBNoBooleanFalseDisables the creation of PodDisruptionBudget for the Aerospike cluster.
enableDynamicConfigUpdateNoBooleanFalseEnables the dynamic config update flow for AKO.
image
Dynamic Rolling restart
YesStringThe official Aerospike Enterprise Database docker image to use for the node in the cluster.
k8sNodeBlockListNoList of StringsList of Kubernetes nodes that are disallowed for scheduling the Aerospike pods. Pods are not scheduled on these nodes and migrated from these nodes if already present.
maxUnavailableNoInteger or String1Sets the maxUnavailable field for PodDisruptionBudget created by AKO for the Aerospike cluster. For more information see Specifying a Disruption Budget for your Application
operatorClientCert
Dynamic
With TLSStructureConfigures the TLS certs used by AKO when connecting to the Aerospike cluster.
podSpec
Dynamic Rolling restart
NoStructureConfigures the Kubernetes pod running Aerospike server.
rackConfig
Dynamic
NoStructureConfigures AKO to deploy rack aware Aerospike clusters. Pods are deployed in racks based on the provided configuration.
rosterNodeBlockList
Dynamic
NoList of StringsConfigures a list of nodeIDs which are blocked from roster in a strong consistency setup.
seedsFinderServices
Dynamic
NoStructureCreates additional Kubernetes services that allow clients to discover Aerospike cluster nodes.
size
Dynamic
YesIntegerThe size/number of Aerospike node pods to run for this cluster.
storage
Dynamic
NoStructureRequired for persistent namespaces and for Aerospike work directory, unless the validation policy skips validating persistence of the work directory.
validationPolicy
Dynamic
NoStructureConfigures the custom resource validation.

Aerospike Access Control

spec -> aerospikeAccessControl

Provides Aerospike access control configuration for the Aerospike cluster.

FieldRequiredTypeDescription
roles
Dynamic
NoList of StructuresA list of Role structures with an entry for each role.
users
Dynamic
NoList of StructuresA list of User structures with an entry for each user. Required if Aerospike security is enabled.

If the Aerospike cluster has security enabled, the CR file must have an entry for the "admin" user having at least "sys-admin" and "user-admin" roles.

Aerospike Role

spec -> aerospikeAccessControl -> roles

Configures roles for the Aerospike cluster.

FieldRequiredTypeDescription
nameYesStringThe name of this role.
privileges
Dynamic
YesList of StringsThe privileges to grant this role.
whitelist
Dynamic
NoList of StringsAllowlist of host address allowed for this role.
readQuota
Dynamic
NoIntegerSpecifies permitted rate of read records for current role (the value is in RPS).
writeQuota
Dynamic
NoIntegerSpecifies permitted rate of writes for current role (the value is in RPS).

Aerospike User

spec -> aerospikeAccessControl -> users

Configures users for the Aerospike cluster.

FieldRequiredTypeDescription
nameYesStringThe name of this user.
secretName
Dynamic
YesStringThe name of the secret containing this user's password.
roles
Dynamic
YesList of StringsThe roles to grant to this user.

Aerospike Config

spec -> aerospikeConfig

The YAML form of Aerospike server configuration. See Aerospike Configuration for details.

Aerospike Config Secret

Configures the name of the secret to use and the mount path to mount the secret files on the container.

FieldRequiredTypeDescription
secretName
Dynamic
YesStringThe name of the secret.
mountPath
Dynamic
YesStringThe path where the secret files will be mounted in the container.

Aerospike Network Policy

spec -> aerospikeNetworkPolicy

This section describes how to configure IP addresses and port types for access and alternate access, TLS and TLS alternate access, fabric and TLS fabric endpoints on the Aerospike cluster.

Aerospike supports the following types of endpoint configurations:

  • pod uses the Kubernetes pod IP address and Aerospike port to connect from other pods in the same Kubernetes cluster.
  • hostInternal uses the Kubernetes cluster node's host IP address and a mapped Aerospike port to connect from the Kubernetes cluster's VPC or internal network.
  • hostExternal uses the Kubernetes cluster node's host external/public IP address and a mapped Aerospike port to connect from the external network.
  • configuredIP uses the IP address configured by the user in the Kubernetes node labels, and a mapped Aerospike port, to connect from the internal/external network. Label "aerospike.com/configured-access-address" in the Kubernetes node is the accessAddress, and label "aerospike.com/configured-alternate-access-address" in the Kubernetes node is the alternateAccessAddress.
  • customInterface uses the IP address assigned to the custom interfaces attached to the pod and Aerospike port, to connect from the same custom interfaces network. These custom interfaces are given separately as a list of NetworkAttachmentDefinition CRs and also, must be defined in the pod annotation k8s.v1.cni.cncf.io/networks to assign network interfaces to the pod.
FieldRequiredTypeDefaultDescription
access
Dynamic Rolling restart
NoEnum [pod, hostInternal, hostExternal, configuredIP, customInterface]hostInternalConfigures Aerospike access endpoint.
customAccessNetworkNames
Dynamic Rolling restart
NoList of StringsList of the pod's network interfaces used for Aerospike access address. Each element is specified with a namespace and the name of a NetworkAttachmentDefinition, separated by a forward slash (/). These elements must be defined in the pod annotation k8s.v1.cni.cncf.io/networks to assign network interfaces to the pod. Required with 'customInterface' access type.
alternateAccess
Dynamic Rolling restart
NoEnum [pod, hostInternal, hostExternal, configuredIP, customInterface]hostExternalConfigures Aerospike alternate access endpoint.
customAlternateAccessNetworkNames
Dynamic Rolling restart
NoList of StringsList of the pod's network interfaces used for Aerospike alternate access address. Each element is specified with a namespace and the name of a NetworkAttachmentDefinition, separated by a forward slash (/). These elements must be defined in the pod annotation k8s.v1.cni.cncf.io/networks to assign network interfaces to the pod. Required with 'customInterface' alternateAccess type.
tlsAccess
Dynamic Rolling restart
NoEnum [pod, hostInternal, hostExternal, configuredIP, customInterface]hostInternalConfigures Aerospike TLS access endpoint.
customTLSAccessNetworkNames
Dynamic Rolling restart
NoList of StringsList of the pod's network interfaces used for Aerospike TLS access address. Each element is specified with a namespace and the name of a NetworkAttachmentDefinition, separated by a forward slash (/). These elements must be defined in the pod annotation k8s.v1.cni.cncf.io/networks to assign network interfaces to the pod. Required with 'customInterface' tlsAccess type.
tlsAlternateAccess
Dynamic Rolling restart
NoEnum [pod, hostInternal, hostExternal, configuredIP, customInterface]hostExternalConfigures Aerospike TLS alternate endpoint.
customTLSAlternateAccessNetworkNames
Dynamic Rolling restart
NoList of StringsList of the pod's network interfaces used for Aerospike TLS alternate access address. Each element is specified with a namespace and the name of a NetworkAttachmentDefinition, separated by a forward slash (/). These elements must be defined in the pod annotation k8s.v1.cni.cncf.io/networks to assign network interfaces to the pod. Required with 'customInterface' tlsAlternateAccess type.
fabricNoEnum [customInterface]Configures Aerospike fabric endpoint.
customFabricNetworkNamesNoList of StringsCustomFabricNetworkNames is the list of the pod's network interfaces used for Aerospike fabric address. Each element in the list is specified with a namespace and the name of a NetworkAttachmentDefinition, separated by a forward slash (/). These elements must be defined in the pod annotation k8s.v1.cni.cncf.io/networks to assign network interfaces to the pod. Required with 'customInterface' fabric type.
tlsFabricNoEnum [customInterface]Configures Aerospike TLS fabric endpoint.
customTLSFabricNetworkNamesNoList of StringsList of the pod's network interfaces used for Aerospike TLS fabric address. Each element is specified with a namespace and the name of a NetworkAttachmentDefinition, separated by a forward slash (/). These elements must be defined in the pod annotation k8s.v1.cni.cncf.io/networks to assign network interfaces to the pod. Required with 'customInterface' tlsFabric type.

Operator Client Cert

spec -> operatorClientCert

AKO needs to connect as an Aerospike client to perform management asinfo calls. If the Aerospike service is configured to use TLS for clients, you need to specify the certificates the client uses to make these calls.

FieldRequiredTypeDescription
certPathInOperatorYesStructureSpecifies the path to the AKO certs as files mounted in the AKO container.
secretCertSourceYesStructureSpecifies that the AKO certs are read from a secret.
tlsClientNameNoStringIf specified, AKO adds this name to the tls-authenticate-client list so that the Aerospike servers will always allow it.
note

Either certPathInOperator or secretCertSource must be specified, but not both.

Cert Path In Operator

spec -> operatorClientCert -> certPathInOperator

Specifies that the AKO certificate files are mounted onto the AKO containers.

FieldRequiredTypeDescription
caCertsPathNoStringThe path to the file or directory containing the CA certificates.
clientCertPathNoStringThe path to the file containing the AKO certificate.
clientKeyPathNoStringThe path to the file containing the AKO secret key.

Secret Cert Source

spec -> operatorClientCert -> secretCertSource

Specifies that the certificate should be read from a Kubernetes Secret.

FieldRequiredTypeDefaultDescription
caCertsFilenameNoStringThe name of the secret key or file containing the CA certificate.
caCertsSourceNoStructureStructure containing CA certificates secret object info.
clientCertFilenameNoStringThe name of the secret key or file containing the AKO certificate.
clientKeyFilenameNoStringThe name of the secret key or file containing the AKO secret key.
secretNameYesStringThe name of the secret.
secretNamespaceNoStringKubernetes namespace where Aerospike cluster is deployedThe namespace containing the secret.

CA Certs Source

spec -> operatorClientCert -> secretCertSource -> caCertsSource

FieldRequiredTypeDefaultDescription
secretNameYesStringThe name of the secret.
secretNamespaceNoStringKubernetes namespace where Aerospike cluster is deployedThe namespace containing the secret.

Pod Spec

spec -> podSpec

Configures the Kubernetes pod running Aerospike server. Sidecar containers for monitoring or running connectors can be added to each Aerospike pod.

FieldRequiredTypeDefaultDescription
aerospikeContainerNoStructureConfigures the aerospike-server container created by AKO.
aerospikeInitContainerNoStructureConfigures the aerospike-init container created by AKO.
affinityNoKubernetes Pod AffinityKubernetes Affinity rules for pod placement. These rules are merged with affinity rules that AKO generates.
dnsPolicyNoKubernetes DNSPolicyDnsPolicy to use. If hostNetwork is true and policy is not specified, it defaults to ClusterFirstWithHostNet.
metadataNoStructureKubernetes Annotations and Labels to add to pods.
multiPodPerHostNoBooleanFalseSpecifies whether to run multiple pods per Kubernetes cluster host.
hostNetworkNoBooleanFalseEnables host networking for the pod. To enable hostNetwork, multiPodPerHost must be false.
imagePullSecretsNoList of TypedLocalObjectReferenceIOptional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
initContainersNoList of Container structuresList of init containers before running Aerospike and the sidecar containers.
nodeSelectorNoMap from string to stringNode selector constraints for the Aerospike pods.
securityContextNoStructure PodSecurityContextHolds pod-level security attributes and common container settings.
sidecarsNoList of Container structuresList of side containers to run along with the main Aerospike server container. Volume mounts are not supported. See storage for attaching volumes to sidecars.
tolerationsNoKubernetes Pod TolerationsKubernetes Toleration for Aerospike pod placement.

See Monitoring for details on configuring monitoring sidecars or Aerospike containers.

Aerospike container

spec -> podSpec -> aerospikeContainer

Configures the aerospike-server container created by AKO.

FieldRequiredTypeDescription
securityContextNoStructure SecurityContextKubernetes security context for the Aerospike container.
resourcesNoStructure ResourceRequirementsConfigures resource requirements and limits like CPU or memory for the Aerospike container.

Aerospike Init Container

spec -> podSpec -> aerospikeInitContainer

Configures the aerospike-init container created by AKO.

FieldRequiredTypeDefaultDescription
imageRegistryNoStringdocker.ioName of image registry for Aerospike init container image.
securityContextNoStructure SecurityContextKubernetes security context for the Aerospike init container.
resourcesNoStructure ResourceRequirementsConfigures resources requirements and limits like CPU or memory for the Aerospike init container.

Metadata

spec -> podSpec -> metadata

Kubernetes annotations and labels to add to the pods.

FieldRequiredTypeDescription
annotationsNoMap from annotation name to its valueKubernetes Annotations
labelsNoMap from label name to its valueKubernetes Labels

Rack Config

spec -> rackConfig

Configures AKO to deploy a rack-aware Aerospike cluster. Pods are deployed in given racks based on the given configuration.

FieldRequiredTypeDescription
namespaces
Dynamic Rolling restart
NoList of StringsList of the Aerospike namespaces to enable the rack feature.
racks
Dynamic
YesList of structuresList of racks.
rollingUpdateBatchSize
Dynamic
NoInteger or StringConfigures the number or percentage of rack pods to restart simultaneously during a rolling restart. The value can be integer eg. 5 or string eg. "25%".
maxIgnorablePods
Dynamic
NoInteger or StringConfigures the maximum number or percentage of pending or failed pods in a rack that are ignored while assessing cluster stability. Pods identified using this value are not considered part of the cluster. Additionally, in SC mode clusters, these pods are removed from the roster. The value can be integer eg. 5 or string eg. "25%".
scaleDownBatchSizeNoInteger or StringThe percentage/number of rack pods that can be scaled down simultaneously.

See Rack awareness for details.

Racks

spec -> rackConfig -> racks

Specifies single rack config.

FieldRequiredTypeDescription
idYesIntegerIdentifier for the rack.
zoneNoStringCloud provider-specific Zone name for setting rack affinity. Rack pods are deployed to the given cloud Zone.
regionNoStringCloud provider-specific Region name for setting rack affinity. Rack pods are deployed to the given cloud Region.
rackLabelNoStringRack label for setting rack affinity. Rack pods are deployed in Kubernetes nodes with the rack label aerospike.com/rack-label: RACK LABEL.
nodeNameNoStringKubernetes node name for setting rack affinity. Rack pods are deployed on the given node.
aerospikeConfig
Dynamic Rolling restart
NoStructureThis local AerospikeConfig is a patch, which merges recursively with the common global AerospikeConfig and used for this Rack. See merge AerospikeConfig. If this AerospikeConfig is not given, the global AerospikeConfig is used.
storage
Dynamic Rolling restart
NoStructureThis local storage specifies persistent storage to use for the pods in this rack. If this storage is not given then global storage is used.
podSpec
Dynamic Rolling restart
NoStructurePod overrides for this rack.
scaleDownBatchSizeNoInteger or StringThe percentage or number of rack pods that can be scaled down simultaneously.

podSpec (Rack override)

spec -> rackConfig -> racks -> podSpec

Provides rack-specific overrides to the Pod spec.

The following overrides are supported.

FieldRequiredTypeDescription
affinityNoKubernetes Pod AffinityKubernetes Affinity rules for pod placement. These rules are merged with affinity rules generated by AKO.
tolerationsNoKubernetes Pod TolerationsKubernetes Toleration for Aerospike pod placement.
nodeSelectorNoMap from string to stringNode selector constraints for the Aerospike pods.

Max Ignorable Pods

spec -> rackConfig -> maxIgnorablePods

maxIgnorablePods is the maximum number or percentage of pending or failed pods in a rack that are ignored while assessing cluster stability. Pods identified using this value are not considered part of the cluster. Additionally, in SC mode clusters, these pods are removed from the roster. This is particularly useful when some pods are stuck in pending or failed states due to any scheduling issues, and cannot be fixed by simply updating the CR. maxIgnorablePods enables specific operations on the cluster, like changing Aerospike configurations, without being hindered by problematic pods.

caution

Avoid using maxIgnorablePods in small clusters or clusters with few nodes per rack. For example, in a 6-node cluster spread across three racks, do not set maxIgnorablePods to 1.

If you are considering using the maxIgnorablePods field, it's important to understand the following key points for its effective and safe application:

  • Use as a Last Resort: Use maxIgnorablePods only as a final option, particularly when issues in the cluster cannot be resolved by updating the CR (Custom Resource).

  • Operate with Knowledge: Only modify this setting if you are confident in your understanding of its impact.

  • Pod Downtime Consideration: If maxIgnorablePods is set to a non-zero value, then the maximum number of pods that can be down in each rack is maxIgnorablePods + RollingUpdateBatchSize (which defaults to 1). It's crucial to ensure that the remaining active pods in each rack have sufficient storage capacity to handle the total rack data during this downtime.

  • Minimize usage of maxIgnorablePods: Keep the maxIgnorablePods value as low as possible. Increasing this number heightens the risk of encountering sizing-related issues within your cluster.

  • Reset after operations: After completing the necessary operations, reset maxIgnorablePods to 0. This ensures that all pods are accurately considered in subsequent assessments of cluster stability.

Seeds Finder Services

spec -> seedsFinderServices

Creates additional Kubernetes service that allow clients to discover Aerospike cluster nodes.

FieldRequiredTypeDescription
loadBalancerNoStructureCreates a load balancer service that allows Aerospike clients to discover Aerospike cluster nodes.

Load Balancer Service

spec -> seedsFinderServices -> loadBalancer

Creates a load balancer service which lets Aerospike clients discover Aerospike cluster nodes.

FieldRequiredTypeDescription
externalTrafficPolicyNoEnum - Local, ClusterExternal Traffic Policy Type string. See ServiceExternalTrafficPolicyType for details.
annotationsNoMap from annotation name to its valueKubernetes Annotations for the load balancer.
portNoIntegerExposed port on load balancer. If not specified targetPort is used.

Storage

spec -> storage

The storage section configures persistent volume devices to provision and attach to the containers.

This section is required by default for persisting the Aerospike work directory. Store the work directory on persistent storage to ensure pod restarts do not reset Aerospike server metadata files.

This section is also required if Aerospike namespaces require persistent storage.

FieldRequiredTypeDefaultDescription
cleanupThreads
Dynamic
NoInteger1Defines the maximum number of disk cleanup threads (dd or blkdiscard) per init container that wipe or initialize disk volumes.
blockVolumePolicy
Dynamic
NoStructureVolume policy for block volumes.
filesystemVolumePolicy
Dynamic
NoStructureVolume policy for filesystem volumes.
volumes
Dynamic
NoList of Volume StructuresList of volumes to attach to Aerospike pods. Persistent storage volumes cannot be added or removed dynamically.

Block/Filesystem Volume Policy

spec -> storage -> blockVolumePolicy

spec -> storage -> filesystemVolumePolicy

Specifies persistent volume policy to determine how new volumes are initialized.

FieldRequiredTypeDefaultDescription
initMethod
Dynamic
NoEnumnoneControls how the volumes are initialized the first time the persistent volume is attached to a pod. Valid values are none, dd, blkdiscard, deleteFiles.
wipeMethod
Dynamic
NoEnumdd for block volumes and deleteFiles for filesystem volumesSpecifies how the volumes are wiped for special upgrades and downgrades. Valid values are dd, blkdiscard, deleteFiles.
cascadeDelete
Dynamic
NoBooleanfalseDetermines if the persistent volumes are deleted after the pods these volumes bind to are terminated and removed from the cluster.

For filesystem volumes:

  • initMethod can be none or deleteFiles
  • wipeMethod can only be deleteFiles

For block volumes:

  • initMethod can be none, dd or blkdiscard
  • wipeMethod can be dd or blkdiscard.
note

blkdiscard only works for devices that support TRIM. For AWS please refer to the storage volumes guide to check TRIM support. If TRIM is not supported, use the slower dd to initialize/wipe your devices. For other devices, verify the support for TRIM command with your vendor.

caution

When using blkdiscard ensure that the drive deterministically returns zeros after TRIM (RZAT). Check with your hardware provider or cloud provider for this information. If you are unsure, it is safer to wipe the device using dd as the wipe method.

Volumes

spec -> storage -> volumes

Describes volumes to be created and attached to the init containers and main Aerospike container, as well as other sidecars.

FieldRequiredTypeDefaultDescription
nameYesStringA name identifying this volume. The name must be unique among all created volumes.
sourceYesStructureSpecifies the source for this volume.
aerospikeNoStructureSpecifies how this volume is attached to the main Aerospike server container.
sidecarsNoStructureAttaches this volume to other sidecar containers.
initContainersNoStructureAttaches this volume to other init containers.
initMethod
Dynamic
NoEnumnoneControls how this volume is initialized when the persistent volume is attached the first time to a pod. Valid values are none, dd, blkdiscard, deleteFiles.
cascadeDelete
Dynamic
NoBooleanfalseCascadeDelete determines if the persistent volume is deleted after the pod this volume binds to is terminated and removed from the cluster.

For filesystem volumes, initMethod can be none or deleteFiles. For block volumes, initMethod can be none, dd or blkdiscard.

note

blkdiscard only works for devices that support TRIM. For AWS please refer to the storage volumes guide to check TRIM support. If TRIM is not supported please use the slower dd to initialize your devices. For other devices please verify the support for TRIM command.

Volume Source

spec -> storage -> volumes -> source

A Volume source specifies the source for an attached volume. Volumes are created using a volume source that can be one of the following:

Persistent Volume

Specifies a persistent volume to claim and attach to Aerospike pods.

FieldRequiredTypeDefaultDescription
storageClassYesStringThe name of the storage class to use.
volumeModeYesEnum - Filesystem, BlockSpecifies the mode this volume should be created with. Filesystem creates a pre-formatted filesystem. Block mode creates a raw device.
sizeYesString QuantityThe device size to be provisioned, for example 5Gi.
accessModesNoList of PersistentVolumeAccessModeAllowed access modes to the volume, for example ReadWriteOnce, ReadOnlyMany, ReadWriteMany.
selectorNoLabelSelectorOnly the volumes whose labels match the selector are claimed.
initMethod
Dynamic
NoEnumnoneControls how this volume is initialized when the persistent volume is attached the first time to a pod. Valid values are none, dd, blkdiscard, deleteFiles.
cascadeDelete
Dynamic
NoBooleanfalseCascadeDelete determines if the persistent volume is deleted after the pod this volume binds to is terminated and removed from the cluster.
EmptyDir

These are volumes to be used as temporary working disk space. See the official documentation for options.

      - name: tempFiles
aerospike:
path: /opt/aerospike/temp
source:
emptyDir: {}
Secret

A Kubernetes Secret can be mounted as a volume. You can use a Secret for mounting the Aerospike feature-key file (features.conf) or sensitive files like TLS certificates and credentials onto the containers.

- name: aerospike-config-secret
source:
secret:
secretName: aerospike-secret
aerospike:
path: /etc/aerospike/secret
ConfigMap

A Kubernetes ConfigMap can be mounted as a volume. ConfigMaps hold non-confidential data like configuration for applications running in your custom init containers or sidecars.

- name: app-config
source:
configMap:
# Provide the name of the ConfigMap you want to mount.
name: app-config
# An optional array of keys from the ConfigMap to create as files
items:
- key: "game.properties"
path: "game.properties"
- key: "user-interface.properties"
path: "user-interface.properties"

Aerospike Database Volume Attachment

spec -> storage -> volumes -> aerospike

Specifies attaching a volume to the main Aerospike Database container.

FieldRequiredTypeDescription
pathYesStringThe path to attach the volume to the Aerospike container.

Init/Sidecar Volume Attachment

spec -> storage -> volumes -> sidecars

spec -> storage -> volumes -> initContainers

Specifies attaching a volume to a sidecar container.

FieldRequiredTypeDescription
containerNameYesStringThe name of the container to attach this volume to.
pathYesStringThe path to attach the volume to the Aerospike container.

Validation Policy

spec -> validationPolicy

This section configures the policy for validating the cluster CR.

FieldRequiredTypeDefaultDescription
skipWorkDirValidate
Dynamic
NoBooleanfalseIf true, skips validating that the Aerospike work directory is stored on a persistent volume.
skipXdrDlogFileValidate
Dynamic
NoBooleanfalseIf true, skips validating that the XDR digest log is stored on a persistent volume.