dotfiles/bin/kubectl-wrapper

10 lines
193 B
Text
Raw Normal View History

#!/bin/bash
cfg=.kubeconfig
path=$(pwd)
while [[ "$path" != "" && ! -e "$path/$cfg" ]]; do
path=${path%/*}
done
exec env KUBECONFIG="$path/$cfg:$KUBECONFIG:$HOME/.kube/config" kubectl "$@"