Delete an instance

Deleting a Valkey resource removes its Operator-managed workloads and Services. This operation is destructive and is not a backup workflow.

Expected impact

Resource or behaviorExpected result
Data Pods and StatefulSetsRemoved by owner references and finalizers.
Cluster, Failover, and Sentinel child custom resources (CRs)Removed with the owning instance.
Services and generated configurationRemoved when their owner is deleted.
Access control list (ACL) User resourcesOperator-managed built-ins and owned custom users can be removed. Record required definitions first.
Persistent volume claims (PVCs) and underlying volumesIn the inspected baseline, generated PVCs carry no owner reference to the instance and no Operator path deletes them, so they remain after deletion regardless of spec.storage.retainAfterDeleted. Verify against the delivered build and remove unneeded PVCs explicitly.
External backups or exportsNot managed by the Operator and must be handled by their owning system.

Before you delete

  1. Stop application writes and confirm that clients no longer use the instance.

  2. Complete and verify your external backup or data export.

  3. Record the PVCs and their reclaim policy:

    kubectl -n <namespace> get pvc -l buf.red/name=<name> -o wide
    kubectl get storageclass
  4. Protect any PVC that must be retained. In the inspected baseline, spec.storage.retainAfterDeleted has no effect: generated PVCs are always left in place after deletion. Do not treat the leftover PVCs as deleted data, and do not assume a delivered build behaves identically without verifying it.

Delete the instance

kubectl -n <namespace> delete valkey <name>

Watch deletion and finalizer processing:

kubectl -n <namespace> get valkey <name> -w
kubectl -n <namespace> get cluster,failover,sentinel,user \
  -l buf.red/name=<name>

After the Valkey resource disappears, inspect remaining PVCs and Secrets before deleting them explicitly:

kubectl -n <namespace> get pvc,secret -l buf.red/name=<name>

Also confirm that no generated workload or Service remains:

kubectl -n <namespace> get cluster,failover,sentinel,user \
  -l buf.red/name=<name>
kubectl -n <namespace> get statefulset,pod,service,configmap \
  -l buf.red/name=<name>

Do not remove finalizers added by the Operator to force deletion unless product support has confirmed the remaining child resources and data-retention consequences.