From 5240a44722ffe15ff3553729955d1719979e4dbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Tue, 1 Aug 2017 19:04:25 +0200 Subject: [PATCH] Changed kubernetes alias and function --- zsh/.zprofile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/zsh/.zprofile b/zsh/.zprofile index 877ea46..6f74e43 100644 --- a/zsh/.zprofile +++ b/zsh/.zprofile @@ -83,6 +83,20 @@ alias drm="docker rm" alias drun="docker run" alias drmi="docker rmi" +alias kg='kubectl --context="kubernetes-admin@kubernetes"' + +kube(){ + if [ "$#" -lt 1 ]; then + echo "Wrapper for kubectl" + echo "" + echo "Usage: $0 ... kubectl args" + return 1 + fi + context=$1 + shift + kubectl --context="$context" "$@" +} + TMPPREFIX="${TMPDIR%/}/zsh" if command -v foo >/dev/null 2>&1 ; then