10 lines
206 B
Text
10 lines
206 B
Text
|
#!/usr/bin/env sh
|
||
|
kubectl config get-contexts --no-headers | \
|
||
|
uniq | \
|
||
|
sort | \
|
||
|
tr -s ' ' | \
|
||
|
sed -E 's/^\*?[[:space:]]*//g' | \
|
||
|
cut -d ' ' -f1 | \
|
||
|
sk | \
|
||
|
xargs -I{} kubectl config use-context '{}'
|