Initial commit: k8s cluster manifests and scripts

This commit is contained in:
2026-04-01 15:34:02 +08:00
commit 2f04fa4473
49 changed files with 4109 additions and 0 deletions

20
apps/postgres/deploy.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# 用途:部署或更新 PostgresSecret / PVC / Deployment / Service
set -euo pipefail
BASE_DIR="$(cd "$(dirname "$0")" && pwd)"
MANIFESTS="$BASE_DIR/manifests"
echo "部署 Postgres 中..."
kubectl apply -f "$MANIFESTS/postgres-secret.yaml"
kubectl apply -f "$MANIFESTS/postgres-pvc.yaml"
kubectl apply -f "$MANIFESTS/postgres-deployment.yaml"
kubectl apply -f "$MANIFESTS/postgres-service.yaml"
echo "完成,等待 Pod 就緒..."
kubectl wait --for=condition=ready pod -l app=postgres --timeout=120s
echo "Postgres 已啟動"