try to improve the debug pod

This commit is contained in:
Tobias Brunner 2023-03-31 23:10:57 +02:00
parent 2238d43564
commit a78783cf7a
Signed by: tobru
SSH Key Fingerprint: SHA256:kywVhvCA+MIxL6eBgoQa+BfC/ROJqcfD2bpy1PR6Ebk
1 changed files with 3 additions and 2 deletions

View File

@ -60,6 +60,7 @@ EOF
kubectl wait --for=condition=Ready pod/$DEBUG_POD_NAME -n $NAMESPACE
# Open a shell inside the debug pod
kubectl exec -it $DEBUG_POD_NAME -n $NAMESPACE -- /bin/sh
kubectl exec -it $DEBUG_POD_NAME -n $NAMESPACE -- /bin/sh --stdin --tty
trap 'kubectl delete pod $DEBUG_POD_NAME -n $NAMESPACE' EXIT
# Delete the debug pod when the shell session ends
kubectl delete pod $DEBUG_POD_NAME -n $NAMESPACE