Created
November 9, 2019 05:42
-
-
Save andreigec/089994cc441792ebf8b4672b525b2de3 to your computer and use it in GitHub Desktop.
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
# run with execk8s <alias> | |
execk8s(){ | |
echo will exec into $1 | |
EXEC1=$(kubectl get pods -l app=$1 -n $1 | sed -n '2p' | sed 's/\s.*$//') | |
echo E1=$EXEC1 | |
kubectl exec $EXEC1 -n $1 -it /bin/sh | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment