The Aerospike Kubernetes Operator automates the deployment and management of Aerospike enterprise clusters on Kubernetes. The Operator provides a controller that manages a Custom Resource Definition (CRD) to extend the Kubernetes API for Aerospike Enterprise clusters. Aerospike cluster deployment and life cycle management are performed by updating an Aerospike cluster Custom Resource (CR).
For full documentation please visit the official documentation.
The goal of the Operator is to give you the ability to deploy multi-node Aerospike clusters, recover automatically from node failures, scale up or down automatically as load changes, ensure nodes are evenly split across racks or zones, automatically update to new versions of Aerospike and manage configuration changes in your clusters.
The Operator supports the following capabilities:
- Deploy Aerospike clusters
- Scale up and down existing Aerospike clusters
- Version upgrade and downgrade
- Configure persistent storage and resource allocation
- Standardize and validate configurations
- Cluster security management
make generate
make manifests
Run the following command with the appropriate name and version for the operator's image.
IMAGE_TAG_BASE=aerospike/aerospike-kubernetes-operator-nightly
VERSION=2.0.0-dev
make docker-build docker-push IMG=$(IMAGE_TAG_BASE):$(VERSION)
Make sure cert-manager is deployed on your Kubernetes cluster using instructions here.
To deploy the operator build in the previous step run
make deploy IMG=$(IMAGE_TAG_BASE):$(VERSION)
Note: This will also delete the deployed Aerospike clusters because the CRD definitions and all operator related objects are deleted.
To undeploy run
make undeploy IMG=$(IMAGE_TAG_BASE):$(VERSION)
The Aerospike Kubernetes Operator has a custom controller (written in go) that allows us to embed specific lifecycle management logic to effectively manage the state of an Aerospike cluster. It does so by managing a Custom Resource Definition (CRD) to extend the Kubernetes API for Aerospike clusters. Regular maintenance to the Aerospike cluster deployment and management can be performed by updating an Aerospike cluster Custom Resource (CR).
The Operator is deployed with StatefulSet and operates as a headless service to handle the DNS resolution of pods in the deployment. Kubernetes StatefulSets is the workload API object that is used to manage stateful applications. It is important because it manages the deployment and scaling of a set of Pods, and provides guarantees about the ordering and uniqueness of these Pods (e.g. as unique addressable identities).
A layered approach is taken to orchestration which allows the Operator to manage Aerospike Cluster tasks outside the Aerospike deployment.