diff --git a/.bash.d/k8s.sh b/.bash.d/k8s.sh index f9d796ba..9463705f 100644 --- a/.bash.d/k8s.sh +++ b/.bash.d/k8s.sh @@ -18,11 +18,15 @@ # ============================================================================ # kubectl_opts="${KUBECTL_OPTS:-}" +# set K8S_NAMESPACE in local .bashrc or similar files for environments where your ~/.kube/config +# gets regenerated daily with certification authentication from a kerberos login script, which +# resets the 'kcd bigdata' namespace change. This way your automatically send the right namespace every time if [ "${K8S_NAMESPACE:-}" ]; then kubectl_opts="-n $K8S_NAMESPACE" fi k(){ + # want opts auto split, do not quote $kubectl_opts # shellcheck disable=SC2086 kubectl $kubectl_opts "$@" }