feat(scripts): stop-app.sh — full teardown
This commit is contained in:
parent
8f6178e057
commit
b9f9b45b2e
18
stop-app.sh
Normal file
18
stop-app.sh
Normal file
@ -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.)"
|
||||
Loading…
Reference in New Issue
Block a user