Skip to main content
Version: release-0.8

Delete a PostgreSQL Cluster

note

The termination policy determines how a cluster is deleted.

Termination policy

terminationPolicyDeleting Operation
DoNotTerminateDoNotTerminate blocks delete operation.
HaltHalt deletes workload resources such as statefulset, deployment workloads but keep PVCs.
DeleteDelete deletes workload resources and PVCs but keep backups.
WipeOutWipeOut deletes workload resources, PVCs and all relevant resources included backups.

To check the termination policy, execute the following command.

kbcli cluster list pg-cluster
>
NAME NAMESPACE CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS CREATED-TIME
pg-cluster default postgresql postgresql-14.7.0 Delete Running Mar 03,2023 18:49 UTC+0800

Step

Run the command below to delete a specified cluster.

kbcli cluster delete pg-cluster