# Configure Aerospike on Kubernetes with AKO

## Overview

The pages in this section describe how to configure an Aerospike Database deployment with Aerospike Kubernetes Operator (AKO).

Aerospike cluster configuration settings are in the Aerospike cluster Custom Resource (CR) file. When you make changes in the CR file, AKO reads the changes and applies them to the cluster. 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.

By default, and for all examples in this documentation, the CR file is named `aerospike-cluster.yaml` and located in the same directory where you run `kubectl` commands.

## AKO configuration

Kubernetes requires configurations in YAML format, while Aerospike uses its own format. AKO translates between the two formats automatically, which means you must follow the [specific YAML conventions required for configuration](https://aerospike.com/docs/kubernetes/4.1.x/manage/configure/config-mapping).

See [Configuration parameters](https://aerospike.com/docs/kubernetes/4.1.x/reference/config-reference) for a list of all parameters and details on usage. Many parameters support [dynamic configuration](https://aerospike.com/docs/kubernetes/4.1.x/manage/configure/dynamic-config), to update the cluster upon changes without requiring a restart.

## 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](https://aerospike.com/docs/kubernetes/4.1.x/manage/configure/scaling)
-   Split a single cluster across different hardware: [Rack awareness](https://aerospike.com/docs/kubernetes/4.1.x/manage/configure/rack-awareness)
-   Duplicate a cluster across different datacenters: [XDR](https://aerospike.com/docs/kubernetes/4.1.x/manage/configure/xdr)
-   Set up monitoring for the cluster using external tools: [Monitoring](https://aerospike.com/docs/kubernetes/4.1.x/observe/operator-monitoring)
-   Set up an automatically-managed strong consistency namespace to guarantee no partial writes: [Strong Consistency](https://aerospike.com/docs/kubernetes/4.1.x/manage/configure/strong-consistency)

## 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, make a change to the number of file descriptors available to each Aerospike Database instance. By default, this is `15000`. Change the [`spec.aerospikeConfig.service.proto-fd-max`](https://aerospike.com/docs/database/reference/config#service__proto-fd-max) field in the CR file to `20000`.
    
    ```yaml
    apiVersion: asdb.aerospike.com/v1
    
    kind: AerospikeCluster
    
    metadata:
    
      name: aerocluster
    
      namespace: aerospike
    
    spec:
    
      size: 2
    
      image: aerospike/aerospike-server-enterprise:8.1.0.0
    
      aerospikeConfig:
    
        service:
    
          proto-fd-max: 15000
    ```
    
2.  Save and exit the CR file, then use `kubectl` to apply the change.
    
    Terminal window
    
    ```shell
    kubectl apply -f aerospike-cluster.yaml
    ```
    
    The Kubernetes pods undergo a rolling restart.
    
    > Output:
    > 
    > Terminal window
    > 
    > ```sh
    > $ kubectl get pods -n aerospike
    > 
    > 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
    
    ```sh
    $ kubectl -n aerospike describe aerospikecluster aerocluster
    
    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](https://aerospike.com/docs/kubernetes/4.1.x/install/limitations) page for more information.