zkt26/z2/stop-app.sh

23 lines
1.1 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Remove all Kubernetes objects for Vigimeteo
set -e
echo "╔══════════════════════════════════════════╗"
echo "║ Vigimétéo Stop App ║"
echo "╚══════════════════════════════════════════╝"
echo "Stopping app..."
# 1- Deleting the namespace removes everything inside it automatically
kubectl delete namespace vigimeteo --ignore-not-found
# 2 - The PersistentVolume is cluster-scoped so it must be deleted separately
kubectl delete pv vigimeteo-db-pv --ignore-not-found
echo ""
echo "════════════════════════════════════════════"
echo " All Vigimeteo Kubernetes objects removed."
echo " Note: ~/vigimeteo-db-data was NOT deleted."
echo " Run: rm -rf ~/vigimeteo-db-data to clean up."
echo "════════════════════════════════════════════"
echo "App stopped."