---
title: "Strong consistency for Aerospike on Kubernetes"
description: "Configure strong consistency for Aerospike namespaces on Kubernetes using the AerospikeCluster custom resource."
---

# Strong consistency for Aerospike on Kubernetes

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

This page explains how to configure a strong consistency (SC) namespace in the `AerospikeCluster` custom resource (CR). In SC mode, database writes either complete or fail, with no partial writes. When you use AKO to manage an SC namespace, AKO manages the roster and validates unavailable or dead partitions before actions like rolling restarts or scaling down.

## Set up an SC namespace

1.  Add the `strong-consistency: true` parameter in the namespace section of the CR file.
    
    ```yaml
    aerospikeConfig:
    
        namespaces:
    
          - name: test
    
            replication-factor: 2
    
            strong-consistency: true
    
            storage-engine:
    
              type: device
    
              devices:
    
                - /test/dev/xvdf
    ```
    
    For the full CR file, see the strong consistency example in [the main Aerospike Kubernetes Operator repository](https://github.com/aerospike/aerospike-kubernetes-operator/tree/master/config/samples).
    
2.  Save and exit the CR file, then apply the change with `kubectl`.
    
    Terminal window
    
    ```shell
    kubectl apply -f aerospike-cluster.yaml
    ```
    
3.  Verify that AKO applied the namespace configuration.
    
    Terminal window
    
    ```shell
    kubectl describe aerospikecluster AEROSPIKE_CLUSTER_NAME -n NAMESPACE
    ```
    
    Check the target namespace under `Status > Aerospike Config > Namespaces` and confirm that the namespace shows `strong-consistency: true`.
    

## Strong consistency limitations

If there are any dead partitions, AKO stops with an error and user intervention is needed to recover those partitions. For more information on unavailable and dead partitions, see [Validating partition availability](https://aerospike.com/docs/database/learn/strong-consistency).

-   SC mode can not be enabled or disabled on an already-deployed cluster.
-   All racks should have identical SC namespaces.
-   A cluster size smaller than the replication factor is allowed in AP mode but not in SC mode.
-   In-memory only namespaces cannot be configured with strong consistency on a Kubernetes deployment.
-   Batch scale-down is not supported for strong consistency clusters.