Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions content/operate/kubernetes/re-clusters/delete-custom-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ linkTitle: Delete custom resources
weight: 70
---

{{< warning >}}
Use graceful deletion methods

When deleting Redis Enterprise resources or pods, try to avoid use `kubectl delete --force` or similar force deletion commands, as these can lead to:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering whether we should actually say that, because:

  1. --force flag doesn't have any effect on custom resources - it doesn't change the deletion behavior. In fact, I'm not aware of any k8s resource besides Pods that support non-graceful deletion. The k8s documentation vaguely say that "only a subset of resources support graceful deletion", but I believe this comes down to... pods only.
  2. Regardless, users don't need to, and typically shouldn't, delete operator-managed resources on their own. They should only delete custom resources that they've created (REC, REDB, ...), and the operator should take care of deleting related/managed resources that it created. Particularly, users shouldn't be deleting REC pods directly.. this typically leads to problems.

- Data loss or corruption
- Incomplete cleanup of resources
- Cluster instability

If resources appear stuck during deletion, investigate the underlying cause rather than forcing deletion. See [Troubleshoot Redis Enterprise pods]({{< relref "/operate/kubernetes/recommendations/troubleshoot-pods" >}}) for guidance.
{{< /warning >}}

## Multi-namespace management

Before you can delete a namespace, you must remove the Redis custom resources ([REDB](#delete-a-database-redb), [REC](#delete-a-redis-enterprise-cluster-rec), and [operator](#delete-operator-from-one-namespace)) residing within a namespace before you can delete that namespace. Deleting namespace containing an REDB may cause errors or data loss.
Expand Down