Files
k3s/apps/postgres/stop.sh

14 lines
347 B
Bash
Executable File
Raw 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.
#!/usr/bin/env bash
# 用途:停止 Postgres不刪 PVC 與 Secret
set -euo pipefail
echo "停止 Postgres 中..."
kubectl delete deployment postgres --ignore-not-found
kubectl wait --for=delete pod -l app=postgres --timeout=60s || true
kubectl delete service postgres --ignore-not-found
echo "Postgres 已停止(資料仍保留)"