From 9ac97ef91faa1c06071aee63999a1859a32a9306 Mon Sep 17 00:00:00 2001 From: Ilya Kaznacheev Date: Thu, 29 Oct 2020 01:44:39 +0300 Subject: [PATCH] Add better configMap cleanup descripion --- examples/combineConfigs.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/combineConfigs.md b/examples/combineConfigs.md index ab2f310e7..3f014277a 100644 --- a/examples/combineConfigs.md +++ b/examples/combineConfigs.md @@ -251,8 +251,15 @@ specification of the cluster's desired state to point deployments to _new_ configMaps with _new_ names. `kustomize` makes this easy with its `configMapGenerator` directive and associated naming -controls. A GC process in the k8s master eventually -deletes unused configMaps. +controls. + +To remove outdated configMaps add a label +to your resource, for example, kustomize-cleanup="true", +and then you can use `kustomize` to prune old resources^ + +> ``` +> kustomize build | kubectl apply --prune -f- -l kustomize-cleanup="true" +> ``` ### Create and use the overlay for _production_