Skip to content

Commit 99dbe4a

Browse files
authored
Merge pull request #27939 from feitnomore/patch-2
Updating --cascade as false is deprecated on Kubectl 1.21
2 parents fc048b3 + 743b5d5 commit 99dbe4a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/en/docs/tasks/run-application/delete-stateful-set.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ You may need to delete the associated headless service separately after the Stat
4343
kubectl delete service <service-name>
4444
```
4545

46-
When deleting a StatefulSet through `kubectl`, the StatefulSet scales down to 0. All Pods that are part of this workload are also deleted. If you want to delete only the StatefulSet and not the Pods, use `--cascade=false`.
46+
When deleting a StatefulSet through `kubectl`, the StatefulSet scales down to 0. All Pods that are part of this workload are also deleted. If you want to delete only the StatefulSet and not the Pods, use `--cascade=orphan`.
4747
For example:
4848

4949
```shell
50-
kubectl delete -f <file.yaml> --cascade=false
50+
kubectl delete -f <file.yaml> --cascade=orphan
5151
```
5252

53-
By passing `--cascade=false` to `kubectl delete`, the Pods managed by the StatefulSet are left behind even after the StatefulSet object itself is deleted. If the pods have a label `app=myapp`, you can then delete them as follows:
53+
By passing `--cascade=orphan` to `kubectl delete`, the Pods managed by the StatefulSet are left behind even after the StatefulSet object itself is deleted. If the pods have a label `app=myapp`, you can then delete them as follows:
5454

5555
```shell
5656
kubectl delete pods -l app=myapp

0 commit comments

Comments
 (0)