Skip to main content
Version: Operator 2.3.0

Install the Operator from OperatorHub

This procedure applies to:


For Kubernetes 1.23 version or later, Pod Security Admission (PSA) is enabled by default. Make sure the namespace where the Aerospike Operator is installed has either baseline or privileged Pod Security Standard level set. The restricted level is not supported by Aerospike. The default Pod Security Standard level in Kubernetes 1.23 is privileged. For more details, see Apply Pod Security Standards

Install the OLM and Operator

Install the Operator Lifecycle Manager (OLM) on your Kubernetes cluster with the command:

curl -sL | bash -s v0.21.2

Next, install the Aerospike Kubernetes Operator:

kubectl create -f

Verify the Operator is Running

Verify that the Operator's CSV is in the Succeeded phase.

kubectl get csv -n operators aerospike-kubernetes-operator.v2.3.0 -w

You will see output similar to the following:

NAME                                   DISPLAY                         VERSION   REPLACES   PHASE
aerospike-kubernetes-operator.v2.3.0 Aerospike Kubernetes Operator 2.3.0 Succeeded

The Operator runs as two replicas by default, for higher availability. Run the following command to follow the logs for the Operator pods.

kubectl -n operators logs -f deployment/aerospike-operator-controller-manager manager


2022-06-16T19:09:58.058Z    INFO    controller-runtime.metrics  metrics server is starting to listen    {"addr": ""}
2022-06-16T19:09:58.062Z INFO setup Init aerospike-server config schemas

2022-06-16T19:09:58.071Z DEBUG schema-map Config schema added {"version": "4.7.0"}
2022-06-16T19:09:58.072Z INFO aerospikecluster-resource Registering mutating webhook to the webhook server
2022-06-16T19:09:58.073Z INFO controller-runtime.webhook registering webhook {"path": "/mutate-asdb-aerospike-com-v1beta1-aerospikecluster"}
2022-06-16T19:09:58.073Z INFO controller-runtime.builder skip registering a mutating webhook, admission.Defaulter interface is not implemented {"GVK": ", Kind=AerospikeCluster"}
2022-06-16T19:09:58.073Z INFO controller-runtime.builder Registering a validating webhook {"GVK": ", Kind=AerospikeCluster", "path": "/validate-asdb-aerospike-com-v1beta1-aerospikecluster"}
2022-06-16T19:09:58.073Z INFO controller-runtime.webhook registering webhook {"path": "/validate-asdb-aerospike-com-v1beta1-aerospikecluster"}
2022-06-16T19:09:58.074Z INFO setup Starting manager
I1015 19:09:58.074722 1 leaderelection.go:243] attempting to acquire leader lease aerospike/

Grant permissions to the target namespaces

The Operator is installed in the operators namespace. You need to configure additional service accounts configured for the target Kubernetes namespace where the Aerospike clusters are created.

To do this, first create the Kubernetes namespace if it doesn't already exist:

kubectl create namespace [namespace]

For example, the command to create a namespace called aerospike is:

kubectl create namespace aerospike

Next, create a service account:

kubectl -n [namespace] create serviceaccount aerospike-operator-controller-manager

Add this service account to the Operator's ClusterRoleBinding:

kubectl edit $(kubectl get  | grep aerospike-kubernetes-operator | grep -v -- "-opera-" | grep -v -- "default-ns" | cut -f 1 -d " ")

This command launches an editor. Append the following lines to the subjects section:

# A new entry for aerospike.
# Replace aerospike with your namespace
- kind: ServiceAccount
name: aerospike-operator-controller-manager
namespace: aerospike

Save and ensure that the changes are applied.

Here is a full example of the Operator's ClusterRoleBinding targeting the aerospike namespace.

kind: ClusterRoleBinding
creationTimestamp: "2022-06-16T10:48:36Z"
olm.owner: aerospike-kubernetes-operator.v2.3.0
olm.owner.kind: ClusterServiceVersion
olm.owner.namespace: test ""
name: aerospike-kubernetes-operator.v2.3.0-74b946466d
resourceVersion: "51841234"
uid: be546dd5-b21e-4cc3-8a07-e2fe5fe5274c
kind: ClusterRole
name: aerospike-kubernetes-operator.v2.3.0-74b946466d
- kind: ServiceAccount
name: aerospike-operator-controller-manager
namespace: operators

# New entry
- kind: ServiceAccount
name: aerospike-operator-controller-manager
namespace: aerospike