Better aliases

This commit is contained in:
2023-03-13 10:50:09 +01:00
parent 1e22523291
commit a6da6880ba
2 changed files with 13 additions and 1 deletions
+5
View File
@@ -112,6 +112,10 @@ fi
command -v kubectl > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [ -f $HOME/.kubes/current-cube ]; then
export KUBECONFIG=$(cat $HOME/.kubes/current-cube)
fi
# Sets the kube config
kube() {
local kube_config=$HOME/.kubes/$1/config
@@ -122,6 +126,7 @@ if [ $? -eq 0 ]; then
echo >&2 error: no such kube config: $kube_config
return 1
else
echo $kube_config > ~/.kubes/current-cube
export KUBECONFIG=$kube_config
fi
}