# 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.

1.  Remove the CRDs that AKO created. This step automatically deletes any corresponding CRs in the Kubernetes cluster. Remove the following CRDs in sequence:
    
    ```plaintext
    kubectl delete crd aerospikerestores.asdb.aerospike.com
    
    kubectl delete crd aerospikebackups.asdb.aerospike.com
    
    kubectl delete crd aerospikebackupservices.asdb.aerospike.com
    
    kubectl delete crd aerospikeclusters.asdb.aerospike.com
    ```
    
2.  Remove `serviceaccount`.
    
    ```plaintext
    kubectl -n NAMESPACE delete serviceaccount aerospike-operator-controller-manager
    ```
    
3.  Use one of the following commands to remove the `rolebinding` or `clusterrolebinding` depending on which binding was created.
    
    ```plaintext
    kubectl -n NAMESPACE delete rolebinding AEROSPIKE_CLUSTER
    
    OR
    
    kubectl delete clusterrolebinding AEROSPIKE_CLUSTER
    ```
    
4.  Remove ClusterRole.
    
    ```plaintext
    kubectl delete clusterrole aerospike-cluster
    ```
    

## Uninstall AKO

-   [OLM](#tab-panel-1038)
-   [Helm](#tab-panel-1039)

1.  Run the following commands to find the resource names on your cluster that you can delete.
    
    ```plaintext
    # List subscriptions
    
    kubectl get subscription -n NAMESPACE | grep aerospike
    
    # List CSVs
    
    kubectl get csv -n NAMESPACE | grep aerospike
    ```
    
2.  Delete the Subscription.
    
    Terminal window
    
    ```shell
    kubectl delete subscription SUBSCRIPTION -n NAMESPACE
    ```
    
3.  Delete the ClusterServiceVersion (CSV).
    
    ```plaintext
    kubectl delete csv CSV -n NAMESPACE
    ```
    
4.  If AKO was installed in a dedicated namespace and nothing else remains in it, you can remove the namespace with the following command:
    
    ```plaintext
    kubectl delete namespace NAMESPACE
    ```
    

1.  Run `helm list -n NAMESPACE` to list all Helm releases available for that namespace.
    
2.  Replace `NAMESPACE` with your namespace name, and `RELEASE` with the Helm release.
    
    ```plaintext
    helm uninstall RELEASE -n NAMESPACE
    ```
    
3.  If AKO was installed in a dedicated namespace and nothing else remains in it, you can remove the namespace with the following command:
    
    ```plaintext
    kubectl delete namespace NAMESPACE
    ```