1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-11-24 05:02:29 +00:00

Changed kubernetes alias and function

This commit is contained in:
J. Fernando Sánchez 2017-08-01 19:04:25 +02:00
parent ae9e8f5d7c
commit 5240a44722

View File

@ -83,6 +83,20 @@ alias drm="docker rm"
alias drun="docker run" alias drun="docker run"
alias drmi="docker rmi" alias drmi="docker rmi"
alias kg='kubectl --context="kubernetes-admin@kubernetes"'
kube(){
if [ "$#" -lt 1 ]; then
echo "Wrapper for kubectl"
echo ""
echo "Usage: $0 <namespace> ... kubectl args"
return 1
fi
context=$1
shift
kubectl --context="$context" "$@"
}
TMPPREFIX="${TMPDIR%/}/zsh" TMPPREFIX="${TMPDIR%/}/zsh"
if command -v foo >/dev/null 2>&1 ; then if command -v foo >/dev/null 2>&1 ; then