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/kubfc

10 lines
206 B
Plaintext
Raw Normal View History

#!/usr/bin/env sh
kubectl config get-contexts --no-headers | \
uniq | \
sort | \
tr -s ' ' | \
sed -E 's/^\*?[[:space:]]*//g' | \
cut -d ' ' -f1 | \
2022-12-13 14:12:29 -06:00
sk | \
xargs -I{} kubectl config use-context '{}'