Skip to content

Commit fa882c6

Browse files
authored
Merge pull request #29394 from Patil2099/cascade-fix
Replace cascade=false -> cascade=orphan
2 parents faa7ed2 + b4ef0b9 commit fa882c6

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

content/en/blog/_posts/2021-05-14-using-finalizers-to-control-deletion.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,17 @@ kubectl get configmap
190190
No resources found in default namespace.
191191
```
192192

193-
To sum things up, when there's an override owner reference from a child to a parent, deleting the parent deletes the children automatically. This is called `cascade`. The default for cascade is `true`, however, you can use the --cascade=false option for `kubectl delete` to delete an object and orphan its children.
193+
To sum things up, when there's an override owner reference from a child to a parent, deleting the parent deletes the children automatically. This is called `cascade`. The default for cascade is `true`, however, you can use the --cascade=orphan option for `kubectl delete` to delete an object and orphan its children.
194194

195-
In the following example, there is a parent and a child. Notice the owner references are still included. If I delete the parent using --cascade=false, the parent is deleted but the child still exists:
195+
In the following example, there is a parent and a child. Notice the owner references are still included. If I delete the parent using --cascade=orphan, the parent is deleted but the child still exists:
196196

197197
```
198198
kubectl get configmap
199199
NAME DATA AGE
200200
mymap-child 0 13m8s
201201
mymap-parent 0 13m8s
202202
203-
kubectl delete --cascade=false configmap/mymap-parent
203+
kubectl delete --cascade=orphan configmap/mymap-parent
204204
configmap "mymap-parent" deleted
205205
206206
kubectl get configmap

content/en/docs/concepts/workloads/controllers/daemonset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ You can modify the Pods that a DaemonSet creates. However, Pods do not allow al
185185
fields to be updated. Also, the DaemonSet controller will use the original template the next
186186
time a node (even with the same name) is created.
187187

188-
You can delete a DaemonSet. If you specify `--cascade=false` with `kubectl`, then the Pods
188+
You can delete a DaemonSet. If you specify `--cascade=orphan` with `kubectl`, then the Pods
189189
will be left on the nodes. If you subsequently create a new DaemonSet with the same selector,
190190
the new DaemonSet adopts the existing Pods. If any Pods need replacing the DaemonSet replaces
191191
them according to its `updateStrategy`.

content/en/docs/concepts/workloads/controllers/job.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ to keep running, but you want the rest of the Pods it creates
523523
to use a different pod template and for the Job to have a new name.
524524
You cannot update the Job because these fields are not updatable.
525525
Therefore, you delete Job `old` but _leave its pods
526-
running_, using `kubectl delete jobs/old --cascade=false`.
526+
running_, using `kubectl delete jobs/old --cascade=orphan`.
527527
Before deleting it, you make a note of what selector it uses:
528528
529529
```shell

content/en/docs/concepts/workloads/controllers/replicationcontroller.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ When using the REST API or Go client library, you need to do the steps explicitl
192192

193193
You can delete a ReplicationController without affecting any of its pods.
194194

195-
Using kubectl, specify the `--cascade=false` option to [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete).
195+
Using kubectl, specify the `--cascade=orphan` option to [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete).
196196

197197
When using the REST API or Go client library, you can delete the ReplicationController object.
198198

content/en/docs/tasks/administer-cluster/use-cascading-deletion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ For details, read the [documentation for your Kubernetes version](/docs/home/sup
302302
Run the following command:
303303

304304
```shell
305-
kubectl delete deployment nginx-deployment --cascade=false
305+
kubectl delete deployment nginx-deployment --cascade=orphan
306306
```
307307

308308
**Using the Kubernetes API**

0 commit comments

Comments
 (0)