This commit is contained in:
Thomas Forgione 2023-02-17 15:37:29 +01:00
parent c8f0d4d729
commit 008fec04a7
1 changed files with 16 additions and 0 deletions

View File

@ -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