Configure Aerospike on Kubernetes with AKO
About this section
This section explains how to configure an Aerospike Database deployment with Aerospike Kubernetes Operator (AKO). Store cluster settings in the Aerospike cluster CR file. When you create or update the CR file, AKO applies the changes to the cluster.
By default, the examples in this documentation use a CR file named aerospike-cluster.yaml in the directory where you run kubectl.
AKO configuration
Kubernetes uses YAML, while Aerospike uses its own configuration format. AKO translates between the two formats, so you must follow the YAML configuration conventions.
See Configuration parameters for a list of all parameters and details on usage.
Many parameters support dynamic configuration, which lets you update the cluster without a restart.
To change replication-factor for an AP namespace after deployment, see Updating replication factor.
Features
See the following pages for in-depth explanations and guides to configuring certain features on your Aerospike cluster.
- Change the compute resources available to your cluster: Scaling
- Split a single cluster across different hardware: Rack awareness
- Duplicate a cluster across different datacenters: XDR
- Set up monitoring for the cluster using external tools: Monitoring
- Set up an automatically-managed strong consistency namespace to guarantee no partial writes: Strong Consistency
- Change namespace
replication-factorafter deployment for an AP namespace: Replication factor
Configuration change process
In this example, we modify a parameter, triggering a rolling restart (default behavior), and check the parameter value after the restart.
-
Edit and apply the CR file. For this example, change the number of file descriptors available to each Aerospike Database instance from
15000to20000. Updatespec.aerospikeConfig.service.proto-fd-maxin the CR file.apiVersion: asdb.aerospike.com/v1kind: AerospikeClustermetadata:name: aeroclusternamespace: aerospikespec:size: 2image: aerospike/aerospike-server-enterprise:8.1.2.0aerospikeConfig:service:proto-fd-max: 20000 -
Save and exit the CR file, then use
kubectlto apply the change.Terminal window kubectl apply -f aerospike-cluster.yamlThe Kubernetes pods undergo a rolling restart.
Terminal window kubectl get pods -n aerospikeOutput NAME READY STATUS RESTARTS AGEaerocluster-0-0 1/1 Running 0 3m6saerocluster-0-1 1/1 Running 0 3m6saerocluster-0-2 1/1 Running 0 30saerocluster-0-3 1/1 Terminating 0 30s -
After all the pods have restarted, use
kubectl describeto get the cluster status. Checkspec.aerospikeConfig.service.proto-fd-maxunder “Status.”Terminal window kubectl -n aerospike describe aerospikecluster aeroclusterOutput Name: aeroclusterNamespace: aerospikeKind: AerospikeCluster...Status:Aerospike Config:Service:Proto - Fd - Max: 20000...
Unchangeable parameters
AKO does not support setting certain configuration parameters in the CR file. See the limitations page for more information.