This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/common/bin/kubfn

13 lines
243 B
Text
Raw Normal View History

#!/usr/bin/env sh
has_command kubectl || {
echo "kubectl command not found"
exit 1
}
kubectl get namespaces --show-labels | \
uniq | \
sort | \
cut -d ' ' -f1 | \
2022-12-13 14:12:29 -06:00
sk | \
xargs -I{} kubectl config set-context --current --namespace='{}'