Skip to content

Commit 8b86f5f

Browse files
authored
Merge pull request #25985 from ajaygm/patch-1
Fixed deprecated delete cascade 'false' value
2 parents f5c6049 + 27ceb59 commit 8b86f5f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

content/en/docs/concepts/workloads/controllers/garbage-collection.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,17 @@ curl -X DELETE localhost:8080/apis/apps/v1/namespaces/default/replicasets/my-rep
150150
```
151151

152152
kubectl also supports cascading deletion.
153-
To delete dependents automatically using kubectl, set `--cascade` to true. To
154-
orphan dependents, set `--cascade` to false. The default value for `--cascade`
155-
is true.
153+
154+
To delete dependents in the foreground using kubectl, set `--cascade=foreground`. To
155+
orphan dependents, set `--cascade=orphan`.
156+
157+
The default behavior is to delete the dependents in the background which is the
158+
behavior when `--cascade` is omitted or explicitly set to `background`.
156159

157160
Here's an example that orphans the dependents of a ReplicaSet:
158161

159162
```shell
160-
kubectl delete replicaset my-repset --cascade=false
163+
kubectl delete replicaset my-repset --cascade=orphan
161164
```
162165

163166
### Additional note on Deployments

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ curl -X DELETE 'localhost:8080/apis/apps/v1/namespaces/default/replicasets/fron
283283

284284
### Deleting just a ReplicaSet
285285

286-
You can delete a ReplicaSet without affecting any of its Pods using [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete) with the `--cascade=false` option.
286+
You can delete a ReplicaSet without affecting any of its Pods using [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete) with the `--cascade=orphan` option.
287287
When using the REST API or the `client-go` library, you must set `propagationPolicy` to `Orphan`.
288288
For example:
289289
```shell

0 commit comments

Comments
 (0)