KubeBlocks
BlogsKubeBlocks Cloud
⌘K
​
Starrocks
Provision
Scale
Stop/Start
Restart
Expand Volume
Delete
  1. Delete a cluster
    1. Termination policy
    2. Steps

Delete a cluster

Termination policy

NOTE

The termination policy determines how a cluster is deleted.

terminationPolicyDeleting Operation
DoNotTerminateDoNotTerminate prevents deletion of the Cluster. This policy ensures that all resources remain intact.
DeleteDelete deletes Cluster resources like Pods, Services, and Persistent Volume Claims (PVCs), leading to a thorough cleanup while removing all persistent data.
WipeOutWipeOut is an aggressive policy that deletes all Cluster resources, including volume snapshots and backups in external storage. This results in complete data removal and should be used cautiously, primarily in non-production environments to avoid irreversible data loss.

To check the termination policy, execute the following command.

kubectl get cluster mycluster -n demo
>
NAME        CLUSTER-DEFINITION   VERSION           TERMINATION-POLICY   STATUS    AGE
mycluster   starrocks            starrocks-3.1.1   Delete               Running   34m
kbcli cluster list mycluster -n demo
>
NAME        NAMESPACE   CLUSTER-DEFINITION     VERSION         TERMINATION-POLICY   STATUS    CREATED-TIME
mycluster   demo                                               Delete               Running   Sep 30,2024 13:03 UTC+0800

Steps

Run the command below to delete a specified cluster.

If you want to delete a cluster and its all related resources, you can modify the termination policy to WipeOut, then delete the cluster.

kubectl patch -n demo cluster mycluster -p '{"spec":{"terminationPolicy":"WipeOut"}}' --type="merge"

kubectl delete -n demo cluster mycluster
kbcli cluster delete mycluster -n demo

© 2025 ApeCloud PTE. Ltd.