Initial commit: k8s cluster manifests and scripts
This commit is contained in:
13
apps/postgres/stop.sh
Executable file
13
apps/postgres/stop.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/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 已停止(資料仍保留)"
|
||||
|
||||
Reference in New Issue
Block a user