Updating --cascade=false to --cascade=orphan
Cascade=false is deprecated in kubectl 1.21, according to Bug https://github.com/kubernetes/website/issues/27920
This commit is contained in:
committed by
GitHub
parent
1e402f834d
commit
ba734d4412
@@ -845,12 +845,12 @@ kubectl get pods -w -l app=nginx
|
|||||||
```
|
```
|
||||||
|
|
||||||
Use [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands/#delete) to delete the
|
Use [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands/#delete) to delete the
|
||||||
StatefulSet. Make sure to supply the `--cascade=false` parameter to the
|
StatefulSet. Make sure to supply the `--cascade=orphan` parameter to the
|
||||||
command. This parameter tells Kubernetes to only delete the StatefulSet, and to
|
command. This parameter tells Kubernetes to only delete the StatefulSet, and to
|
||||||
not delete any of its Pods.
|
not delete any of its Pods.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl delete statefulset web --cascade=false
|
kubectl delete statefulset web --cascade=orphan
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
statefulset.apps "web" deleted
|
statefulset.apps "web" deleted
|
||||||
@@ -966,7 +966,7 @@ kubectl get pods -w -l app=nginx
|
|||||||
```
|
```
|
||||||
|
|
||||||
In another terminal, delete the StatefulSet again. This time, omit the
|
In another terminal, delete the StatefulSet again. This time, omit the
|
||||||
`--cascade=false` parameter.
|
`--cascade=orphan` parameter.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl delete statefulset web
|
kubectl delete statefulset web
|
||||||
|
|||||||
Reference in New Issue
Block a user