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:
Terminal window 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.Terminal window kubectl -n NAMESPACE delete serviceaccount aerospike-operator-controller-manager -
Use one of the following commands to remove the
rolebindingorclusterrolebindingdepending on which binding was created.Terminal window kubectl -n NAMESPACE delete rolebinding AEROSPIKE_CLUSTER# ORkubectl delete clusterrolebinding AEROSPIKE_CLUSTER -
Remove ClusterRole.
Terminal window kubectl delete clusterrole aerospike-cluster
Uninstall AKO
-
Run the following commands to find the resource names on your cluster that you can delete.
Terminal window # 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).
Terminal window 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:
Terminal window 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.Terminal window 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:
Terminal window kubectl delete namespace NAMESPACE