Kctl
This commit is contained in:
parent
c8f0d4d729
commit
008fec04a7
|
@ -124,6 +124,22 @@ if [ $? -eq 0 ]; then
|
|||
fi
|
||||
}
|
||||
|
||||
# Shortcut for kubectl
|
||||
kctl() {
|
||||
local kube_config
|
||||
if [ -z $KUBECONFIG ]; then
|
||||
kube_config=$HOME/.kube/config
|
||||
else
|
||||
kube_config=$KUBECONFIG
|
||||
fi
|
||||
if [ -f $kube_config ]; then
|
||||
kubectl $@
|
||||
else
|
||||
echo >&2 error: $kube_config does not exist
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
fi
|
||||
|
||||
# change to git directory
|
||||
|
|
Loading…
Reference in New Issue