Files
Lee Christensen ba0f3ce6c0 Lots of changes...
more test examples, readd registry/service objects
fix agentmapping, process, host
fix env settings
add DB files
update tables, ruff, formatting, lots of changes...
Merge remote-tracking branch 'origin/main' into host_analysis
return raw HTLM on landing page
and more...
2024-04-23 02:14:21 -04:00

19 lines
490 B
Bash
Executable File

#!/bin/bash
if [ -z "$1" ]
then
echo "Runs bash or other commands in a pod. Usage: ./interact.sh <pod_name> [commands]"
echo " interact.sh pgadmin"
echo " interact.sh pgadmin -c pgadmin -- /bin/sh"
else
POD_NAME=$(kubectl get pod -A | grep -v Terminating | grep $1 | awk '{print $2}')
# check for more than two arguments
if [ $# -gt 2 ]
then
kubectl logs -f --tail=0 $POD_NAME ${@:1}
else
kubectl logs -f --tail=0 $POD_NAME
fi
fi