Better aliases
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user