Merge pull request #25985 from ajaygm/patch-1

Fixed deprecated delete cascade 'false' value
This commit is contained in:
Kubernetes Prow Robot
2021-01-11 10:26:24 -08:00
committed by GitHub
2 changed files with 8 additions and 5 deletions
@@ -150,14 +150,17 @@ curl -X DELETE localhost:8080/apis/apps/v1/namespaces/default/replicasets/my-rep
``` ```
kubectl also supports cascading deletion. kubectl also supports cascading deletion.
To delete dependents automatically using kubectl, set `--cascade` to true. To
orphan dependents, set `--cascade` to false. The default value for `--cascade` To delete dependents in the foreground using kubectl, set `--cascade=foreground`. To
is true. orphan dependents, set `--cascade=orphan`.
The default behavior is to delete the dependents in the background which is the
behavior when `--cascade` is omitted or explicitly set to `background`.
Here's an example that orphans the dependents of a ReplicaSet: Here's an example that orphans the dependents of a ReplicaSet:
```shell ```shell
kubectl delete replicaset my-repset --cascade=false kubectl delete replicaset my-repset --cascade=orphan
``` ```
### Additional note on Deployments ### Additional note on Deployments
@@ -283,7 +283,7 @@ curl -X DELETE 'localhost:8080/apis/apps/v1/namespaces/default/replicasets/fron
### Deleting just a ReplicaSet ### Deleting just a ReplicaSet
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. 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.
When using the REST API or the `client-go` library, you must set `propagationPolicy` to `Orphan`. When using the REST API or the `client-go` library, you must set `propagationPolicy` to `Orphan`.
For example: For example:
```shell ```shell