Created
August 5, 2022 08:46
-
-
Save epcim/f249f6073ab6408c42b50051dfc1b42a to your computer and use it in GitHub Desktop.
k8s container docker exec
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
# enter any kubernetes pod/container directly just by "part" of it's cotnainer name | |
cshell () | |
{ | |
d=$1; | |
docker exec -it $(docker ps |grep "k8s_$d" | awk '{print $1}' | head -1) /bin/bash | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment