This Helm chart allows you to configure and run our official Aerospike Vector Search docker image on a Kubernetes cluster.
This helm chart sets up a StatefulSet
for each AVS instance. We use a StatefulSet
instead of a Deployment
, to have stable DNS names for the
deployed AVS pods.
- Kubernetes cluster
- Helm v3
- An Aerospike cluster that can connect to Pods in the Kubernetes cluster. The Aerospike cluster can be deployed in the same Kubernetes cluster using Aerospike Kubernetes Operator
- Ability to deploy a LoadBalancer on K8s in case AVS app runs outside the Kubernetes cluster
Add the aerospike-helm
helm repository if not already done. (Note: The repository has moved to artifact.aerospike.io. If you are still pointing to aerospike.github.io, please update the repository URL)
helm repo add aerospike-io https://artifact.aerospike.io/artifactory/api/helm/aerospike-helm
Parameter | Description | Default |
---|---|---|
replicaCount |
Configures the number AVS instance pods to run. | '1' |
image |
Configures AVS image repository, tag and pull policy. | see values.yaml |
imagePullSecrets |
For Private docker registries, when authentication is needed. | see values.yaml |
aerospikeVectorSearchConfig |
AVS cluster configuration deployed to /etc/aerospike-vector-search/aerospike-vector-search.yml . |
see values.yaml |
initContainers |
List of initContainers added to each AVS pods for custom cluster behavior. | [] |
serviceAccount |
Service Account details like name and annotations. | see values.yaml |
podAnnotations |
Additional pod annotations. Should be specified as a map of annotation names to annotation values. | {} |
podLabels |
Additional pod labels. Should be specified as a map of label names to label values. | {} |
podSecurityContext |
Pod security context | {} |
securityContext |
Container security context | {} |
service |
Load-Balancer configuration for more details please refer to a Load-Balancer docs. | {} |
resources |
Resource requests and limits for the AVS pods. | {} |
autoscaling |
Enable the horizontal pod auto-scaler. | see values.yaml |
extraVolumes |
List of additional volumes to attach to the AVS pod. | see values.yaml |
extraVolumeMounts |
Extra volume mounts corresponding to the volumes added to extraVolumes . |
see values.yaml |
extraSecretVolumeMounts |
Extra secret volume mounts corresponding to the volumes added to extraVolumes . |
see values.yaml |
affinity |
Affinity rules if any for the pods. | {} |
nodeSelector |
Node selector for the pods. | {} |
tolerations |
Tolerations for the pods. | {} |
We recommend creating a new .yaml
for providing configuration values to the helm chart for deployment.
See the Aerospike Vector repository for examples and deployment scripts.
A sample values yaml file is shown below:
replicaCount: 1
image:
tag: "1.0.0"
aerospikeVectorSearchConfig:
aerospike:
metadata-namespace: "avs-meta"
seeds:
- aerospike-cluster-0-0.aerospike-cluster.aerospike.svc.cluster.local:
port: 3000
Here replicaCount
is the count of AVS pods that are deployed.
The AVS configuration is provided as yaml under the key aerospikeVectorSearchConfig
.
See Aerospike Vector Search configuration documentation for more details on AVS configuration.
We recommend using a namespace for the AVS cluster. If the namespace does not exist run the following command:
kubectl create namespace avs
Create the secret for avs using your Aerospike licence file
# kubectl --namespace <target namespace> create secret generic avs-secret--from-file=features.conf=<path to features conf file>
kubectl --namespace avs create secret generic aerospike-secret --from-file=features.conf=features.conf
# helm install --namespace <target namespace> <helm release name/cluster name> -f <path to custom values yaml> aerospike/aerospike-vector-search
helm install avs-chart --namespace avs -f avs-values.yaml aerospike/aerospike-vector-search
Here avs
is the release name for the AVS cluster and also its cluster name.
On successful deployment you should see output similar to below:
NAME: avs
LAST DEPLOYED: Tue May 21 15:55:39 2024
NAMESPACE: avs
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
To list the pods for the AVS cluster run the following command:
# kubectl get pods --namespace aerospike --selector=app=<helm release name>-aerospike-vector-search
kubectl get pods --namespace aerospike --selector=app=avs-aerospike-vector-search
You should see output similar to the following:
NAME READY STATUS RESTARTS AGE
avs-aerospike-vector-search-0 1/1 Running 0 9m52s
If you are using Aerospike Kubernetes Operator, see quote-search for reference.
# kubectl -n aerospike logs -f statefulset/<helm release name>-aerospike-vector-search
# Skip the -f flag to get a one time dump of the log
kubectl -n aerospike logs -f statefulsets/avs-aerospike-vector-search
# kubectl -n aerospike logs -f <helm release name>-aerospike-vector-search-0
# Skip the -f flag to get a one time dump of the log
kubectl -n aerospike logs -f avs-aerospike-vector-search-0
Edit the aerospikeVectorSearchConfig
section in the custom values file and save the changes.
Upgrade the AVS deployment using the following command.
#helm upgrade --namespace <target namespace> <helm release name> -f <path to custom values yaml file> aerospike/aerospike-vector-search
helm upgrade --namespace avs avs-chart -f avs-values.yaml aerospike/aerospike-vector-search
On successful execution of the command the AVS pods will undergo a rolling restart and come up with the new configuration.
To verify the changes are applied
NOTE: The changes might take some time to apply. If you do not see the desired AVS config try again after some time.
Edit the replicaCount
to the desired AVS instance count and upgrade the AVS deployment using the following command.
#helm upgrade --namespace <target namespace> <helm release name> -f <path to custom values yaml file> aerospike/aerospike-vector-search
helm upgrade --namespace avs avs-chart -f avs-values.yaml aerospike/aerospike-vector-search
Verify that the AVS cluster have been scaled.
- List the pods and verify the count of AVS instances is as desired
NOTE: The changes might take some time to apply. If you do not see the desired count try again after some time.