Skip to content

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-factor after 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.

  1. Edit and apply the CR file. For this example, change the number of file descriptors available to each Aerospike Database instance from 15000 to 20000. Update spec.aerospikeConfig.service.proto-fd-max in the CR file.

    apiVersion: asdb.aerospike.com/v1
    kind: AerospikeCluster
    metadata:
    name: aerocluster
    namespace: aerospike
    spec:
    size: 2
    image: aerospike/aerospike-server-enterprise:8.1.2.0
    aerospikeConfig:
    service:
    proto-fd-max: 20000
  2. Save and exit the CR file, then use kubectl to apply the change.

    Terminal window
    kubectl apply -f aerospike-cluster.yaml

    The Kubernetes pods undergo a rolling restart.

    Terminal window
    kubectl get pods -n aerospike
    Output
    NAME READY STATUS RESTARTS AGE
    aerocluster-0-0 1/1 Running 0 3m6s
    aerocluster-0-1 1/1 Running 0 3m6s
    aerocluster-0-2 1/1 Running 0 30s
    aerocluster-0-3 1/1 Terminating 0 30s
  3. After all the pods have restarted, use kubectl describe to get the cluster status. Check spec.aerospikeConfig.service.proto-fd-max under “Status.”

    Terminal window
    kubectl -n aerospike describe aerospikecluster aerocluster
    Output
    Name: aerocluster
    Namespace: aerospike
    Kind: 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.

Feedback

Was this page helpful?

What type of feedback are you giving?

What would you like us to know?

+Capture screenshot

Can we reach out to you?