zkt26/z2/stop-app.sh

14 lines
757 B
Bash

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "=== Ice Bay — Stop ==="
kubectl delete -f "${SCRIPT_DIR}/deployment.yaml" --ignore-not-found=true
kubectl delete -f "${SCRIPT_DIR}/service.yaml" --ignore-not-found=true
kubectl delete -f "${SCRIPT_DIR}/statefulset.yaml" --ignore-not-found=true
kubectl delete -f "${SCRIPT_DIR}/configmap.yaml" --ignore-not-found=true
kubectl delete -f "${SCRIPT_DIR}/secret.yaml" --ignore-not-found=true
kubectl delete -f "${SCRIPT_DIR}/namespace.yaml" --ignore-not-found=true
kubectl delete pv icebay-postgres-pv --ignore-not-found=true
echo "All removed. To also delete data:"
echo " minikube ssh 'sudo rm -rf /mnt/data/icebay-postgres'"