Created
June 12, 2024 04:48
-
-
Save robert-cronin/0a76a112fe444bccd50cb7ac56e8b1b5 to your computer and use it in GitHub Desktop.
Attach an ephemeral debug container (busybox) to a pod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
POD_NAME=$1 | |
POD_NAMESPACE=$2 | |
if [[ -z $POD_NAME || -z $POD_NAMESPACE ]]; then | |
echo "Usage: $0 POD_NAME POD_NAMESPACE" | |
exit 1 | |
fi | |
kubectl debug -n $POD_NAMESPACE -it $POD_NAME --image=busybox --target=$POD_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment