From fdf2c5a02b9d3c07f26075705bcba51610d68ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Pab=C3=B3n?= Date: Mon, 7 Aug 2017 18:54:59 -0400 Subject: [PATCH] Note on cascading deletes and Deployments (#4671) --- docs/concepts/workloads/controllers/garbage-collection.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/concepts/workloads/controllers/garbage-collection.md b/docs/concepts/workloads/controllers/garbage-collection.md index 0672d3a479..a7d9b1491b 100644 --- a/docs/concepts/workloads/controllers/garbage-collection.md +++ b/docs/concepts/workloads/controllers/garbage-collection.md @@ -147,6 +147,13 @@ Here's an example that orphans the dependents of a ReplicaSet: kubectl delete replicaset my-repset --cascade=false ``` +### Addtional note on Deployments + +When using cascading deletes with deployments you *must* use _propagationPolicy: Foreground_ +to delete not only the ReplicaSets created, but also their Pods. If this type of _propagationPolicy_ +is not used, only the ReplicaSets will be deleted, and the Pods will be orphaned. +See [kubeadm/#149](https://github.com/kubernetes/kubeadm/issues/149#issuecomment-284766613) for more information. + ## Known issues * As of 1.7, garbage collection does not yet support [custom resources](/docs/concepts/api-extension/custom-resources/),