From b9f9b45b2e8eb27e95c5bd6dcfde47359e5efab2 Mon Sep 17 00:00:00 2001 From: Brazing Technology Date: Wed, 29 Apr 2026 11:30:18 +0530 Subject: [PATCH] =?UTF-8?q?feat(scripts):=20stop-app.sh=20=E2=80=94=20full?= =?UTF-8?q?=20teardown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stop-app.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 stop-app.sh diff --git a/stop-app.sh b/stop-app.sh new file mode 100644 index 0000000..1fcc30e --- /dev/null +++ b/stop-app.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -euo pipefail + +echo "[stop-app] Removing Task Manager from Kubernetes..." + +# Reverse order: Deployments and Services first, then StatefulSet+PV+PVC, then Namespace +kubectl delete -f deployment.yaml --ignore-not-found +kubectl delete -f service.yaml --ignore-not-found +kubectl delete -f statefulset.yaml --ignore-not-found +kubectl delete -f namespace.yaml --ignore-not-found + +# The hostPath directory on the minikube node (/mnt/data/taskapp-db) is intentionally +# NOT removed: PV ReclaimPolicy is Retain, so the data survives even after the PV +# object is deleted. To wipe it manually, run: +# minikube ssh -- sudo rm -rf /mnt/data/taskapp-db + +echo "[stop-app] App stopped and removed." +echo "[stop-app] (Persistent data on minikube node is retained at /mnt/data/taskapp-db.)"