nix/lib/modules/home/scripts/common/bin/kubfn
Daniel Flanagan 7915f78ee3
Some checks failed
/ check (push) Failing after 25s
WIP!
2025-02-14 13:04:04 -06:00

12 lines
243 B
Bash
Executable file

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