Uninstall the Aerospike Kubernetes Operator
Overview
This page explains how to uninstall the Aerospike Kubernetes Operator (AKO) from your cluster, including the cleanup of Custom Resource Definitions (CRDs), Custom Resources (CRs) and Role-Based Access Control (RBAC) resources.
Run the following commands to find the names of resources in your deployment.
Replace NAMESPACE
with the name of your namespace.
# List subscriptions
kubectl get subscription -n NAMESPACE | grep aerospike
# List CSVs
kubectl get csv -n NAMESPACE | grep aerospike
# List Helm releases
helm list -n NAMESPACE | grep aerospike
Clean up AerospikeCluster, CRD, and related RBAC resources
This section describes how to remove the AerospikeCluster CRs, CRDs and all related resources, including Aerospike cluster data. Skip this step for uninstalling only the AKO. Uninstall AKO.
Remove the CRDs created by the AKO. This step automatically deletes the corresponding AerospikeCluster CR files in the Kubernetes cluster.
kubectl delete crd aerospikeclusters.asdb.aerospike.com
Remove
serviceaccount
.kubectl -n NAMESPACE delete serviceaccount aerospike-operator-controller-manager
Use one of the following commands to remove
rolebinding
orclusterrolebinding
depending on which binding was created.noteNot all AKO deployments include the same bindings. This step may not apply to your deployment.
kubectl -n NAMESPACE delete rolebinding AEROSPIKE_CLUSTER
kubectl delete clusterrolebinding AEROSPIKE_CLUSTERRemove ClusterRole.
kubectl delete clusterrole aerospike-cluster
Uninstall AKO
This section describes how to uninstall the AKO.
OLM-based uninstall
If the AKO was installed with OLM, run the following commands.
Delete subscription.
kubectl delete subscription SUBSCRIPTION -n NAMESPACE
Delete CSV.
kubectl delete csv CSV -n NAMESPACE
Helm-based uninstall
If the AKO was installed using Helm, uninstall it with the following command.
helm uninstall RELEASE -n NAMESPACE