Better k9s alias
This commit is contained in:
parent
a860c85827
commit
c8f0d4d729
|
@ -79,7 +79,20 @@ fi
|
|||
# Docker and kubernetes aliases
|
||||
command -v k9s > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
alias kns="k9s"
|
||||
kns() {
|
||||
local kube_config
|
||||
if [ -z $KUBECONFIG ]; then
|
||||
kube_config=$HOME/.kube/config
|
||||
else
|
||||
kube_config=$KUBECONFIG
|
||||
fi
|
||||
if [ -f $kube_config ]; then
|
||||
k9s
|
||||
else
|
||||
echo >&2 error: $kube_config does not exist
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
command -v lazydocker > /dev/null 2>&1
|
||||
|
|
Loading…
Reference in New Issue