Delete a cluster
This topic describes how to delete an OceanBase cluster by using ob-operator.
Procedure
-
Run the following command to delete a specific OceanBase cluster:
kubectl delete obclusters.oceanbase.oceanbase.com test -n oceanbase
-
Check whether the cluster and related resources are deleted.
-
If you run the following command to query the deleted OceanBase cluster, no information about the resource is returned:
kubectl get obclusters.oceanbase.oceanbase.com -n oceanbase
-
If you run the following command to query the deleted zone, no information about the resource is returned:
kubectl get obzones.oceanbase.oceanbase.com -n oceanbase
-
If you run the following command to query the deleted OBServer node, no information about the resource is returned:
kubectl get observers.oceanbase.oceanbase.com -n oceanbase
-
Check whether the pods are deleted:
kubectl get pods -n oceanbase
-
Check whether the PersistentVolumeClaim (PVC) is deleted:
kubectl get pvc -n oceanbase