Operator Lifecycle Manager: Cleaning up Operators and Operands

Start removing the MariaDB operator by deleting the Custom Resource that represents the running instance of the database server operand:

kubectl delete mariadb mariadb

Removing the MariaDB Custom Resource should remove all of the Operator's Operands - the database server cluster:

kubectl get deployments

Next, remove your subscription to the MariaDB Operator and its ClusterServiceVersion (CSV):

kubectl delete -f mariadb-subscription.yaml
MARIADB_CSV=`kubectl get csv -o jsonpath={$.items[0].metadata.name}`
kubectl delete csv $MARIADB_CSV

Once the Subscription and ClusterServiceVersion have been removed, the Operator and associated artifacts will be removed from the cluster:

kubectl get pods
kubectl get roles,services,rolebindings,serviceaccounts