#!/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.)"