initial commit
This commit is contained in:
18
dc-backend/logs.sh
Normal file
18
dc-backend/logs.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
export KUBECONFIG="$SCRIPT_DIR/../env/frigo-dev.yaml"
|
||||
|
||||
POD=$(kubectl get pod -n ai-env -l app=dc-backend \
|
||||
--field-selector=status.phase=Running \
|
||||
-o jsonpath='{.items[0].metadata.name}' 2>/dev/null || true)
|
||||
|
||||
if [ -z "$POD" ]; then
|
||||
echo "Kein laufender dc-backend Pod gefunden. Alle Pods:"
|
||||
kubectl get pods -n ai-env -l app=dc-backend
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "=== Logs: $POD ==="
|
||||
kubectl logs -f "$POD" -n ai-env
|
||||
Reference in New Issue
Block a user