From 743b5d5db88c3f6203cce25b885970683f1a5592 Mon Sep 17 00:00:00 2001 From: Marcelo Feitoza Parisi <41125128+feitnomore@users.noreply.github.com> Date: Mon, 10 May 2021 21:12:44 -0300 Subject: [PATCH] Updating --cascade=false to --cascade=orphan Cascade=false is deprecated in kubectl 1.21, according to Bug #27920 --- .../en/docs/tasks/run-application/delete-stateful-set.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/en/docs/tasks/run-application/delete-stateful-set.md b/content/en/docs/tasks/run-application/delete-stateful-set.md index 94b3c583eb..eff3aaee17 100644 --- a/content/en/docs/tasks/run-application/delete-stateful-set.md +++ b/content/en/docs/tasks/run-application/delete-stateful-set.md @@ -43,14 +43,14 @@ You may need to delete the associated headless service separately after the Stat kubectl delete service ``` -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`. +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`. For example: ```shell -kubectl delete -f --cascade=false +kubectl delete -f --cascade=orphan ``` -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: +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: ```shell kubectl delete pods -l app=myapp