Uninstall Aerospike Kubernetes Operator
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.
Clean up AKO CRDs, CRs and related RBAC resources
Before you uninstall AKO, clean up the CRDs, CRs, and other resources it created in your Kubernetes cluster.
-
Remove the CRDs that AKO created. This step automatically deletes any corresponding CRs in the Kubernetes cluster. Remove the following CRDs in sequence:
kubectl delete crd aerospikerestores.asdb.aerospike.comkubectl delete crd aerospikebackups.asdb.aerospike.comkubectl delete crd aerospikebackupservices.asdb.aerospike.comkubectl 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 the
rolebindingorclusterrolebindingdepending on which binding was created.kubectl -n NAMESPACE delete rolebinding AEROSPIKE_CLUSTERORkubectl delete clusterrolebinding AEROSPIKE_CLUSTER -
Remove ClusterRole.
kubectl delete clusterrole aerospike-cluster
Uninstall AKO
-
Run the following commands to find the resource names on your cluster that you can delete.
# List subscriptionskubectl get subscription -n NAMESPACE | grep aerospike# List CSVskubectl get csv -n NAMESPACE | grep aerospike -
Delete the Subscription.
Terminal window kubectl delete subscription SUBSCRIPTION -n NAMESPACE -
Delete the ClusterServiceVersion (CSV).
kubectl delete csv CSV -n NAMESPACE -
If AKO was installed in a dedicated namespace and nothing else remains in it, you can remove the namespace with the following command:
kubectl delete namespace NAMESPACE
-
Run
helm list -n NAMESPACEto list all Helm releases available for that namespace. -
Replace
NAMESPACEwith your namespace name, andRELEASEwith the Helm release.helm uninstall RELEASE -n NAMESPACE -
If AKO was installed in a dedicated namespace and nothing else remains in it, you can remove the namespace with the following command:
kubectl delete namespace NAMESPACE