Skip to content

Instantly share code, notes, and snippets.

@StephanX
Created January 24, 2017 19:09
Show Gist options
  • Save StephanX/57008c4a11fbd046c5e105e368501801 to your computer and use it in GitHub Desktop.
Save StephanX/57008c4a11fbd046c5e105e368501801 to your computer and use it in GitHub Desktop.
#!/bin/sh
# This will make your life easier when you want to shell into a kubernetes pod
if [ "$1" = "" ]; then
echo "Usage: kshell <pod>"
exit 1
fi
COLUMNS=`tput cols`
LINES=`tput lines`
TERM=xterm
kubectl exec -i -t $1 env COLUMNS=$COLUMNS LINES=$LINES TERM=$TERM bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment